feat: multi-channel notifications (Discord/email/generic Webhook)
This commit is contained in:
@@ -24,7 +24,7 @@ router.put('/:id', authenticate, requireRole('owner','admin'), async (req, res)
|
||||
const fields = {};
|
||||
if (req.body.name) fields.name = req.body.name;
|
||||
if (req.body.webhook_url !== undefined) fields.webhook_url = req.body.webhook_url;
|
||||
if (req.body.events) fields.events = req.body.events;
|
||||
if (req.body.type) fields.type = req.body.type;
|
||||
if (req.body.active !== undefined) fields.active = req.body.active?1:0;
|
||||
if (!Object.keys(fields).length) return res.status(400).json({ error: '无更新内容' });
|
||||
const sets = Object.keys(fields).map(k=>`${k}=?`).join(',');
|
||||
|
||||
Reference in New Issue
Block a user