mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Disable Failing Webhooks (#11966)
* todo comment * add failures field to webhooks and sanitize * implement logic * use update instead of save * specify timeout and maximum number of retries * add tests
This commit is contained in:
@@ -108,7 +108,7 @@ api.addWebhook = {
|
||||
url: '/user/webhook',
|
||||
async handler (req, res) {
|
||||
const { user } = res.locals;
|
||||
const webhook = new Webhook(req.body);
|
||||
const webhook = new Webhook(Webhook.sanitize(req.body));
|
||||
|
||||
const existingWebhook = user.webhooks.find(hook => hook.id === webhook.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user