add reset feature for admins/orgs
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 28s
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 28s
This commit is contained in:
@@ -112,6 +112,15 @@ router.post('/hunts/:id/edit', requireHuntAccess, (req, res) => {
|
||||
res.redirect(`/admin/hunts/${hunt.id}`);
|
||||
});
|
||||
|
||||
// Reset hunt scans
|
||||
router.post('/hunts/:id/reset', requireHuntAccess, (req, res) => {
|
||||
const hunt = req.hunt;
|
||||
|
||||
Hunts.resetScans(hunt.id);
|
||||
req.session.flash = { type: 'success', message: `All scan data for "${hunt.name}" has been reset.` };
|
||||
res.redirect(`/admin/hunts/${hunt.id}/edit`);
|
||||
});
|
||||
|
||||
// Delete hunt
|
||||
router.post('/hunts/:id/delete', requireHuntAccess, (req, res) => {
|
||||
const hunt = req.hunt;
|
||||
|
||||
Reference in New Issue
Block a user