Fix jwt-token
This commit is contained in:
@@ -229,6 +229,14 @@ router.delete('/rules/:id', authenticateToken, async (req, res) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete all alert logs associated with this rule first
|
||||||
|
await AlertLog.destroy({
|
||||||
|
where: {
|
||||||
|
alert_rule_id: req.params.id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Now delete the alert rule
|
||||||
await alertRule.destroy();
|
await alertRule.destroy();
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
|
|||||||
Reference in New Issue
Block a user