Batch delete

This commit is contained in:
Alexandre Bodin 2019-12-18 14:31:49 +01:00
parent 99d76552ac
commit 1547fddaeb
2 changed files with 3 additions and 3 deletions

View File

@ -115,8 +115,8 @@
}
},
{
"method": "DELETE",
"path": "/webhooks",
"method": "POST",
"path": "/webhooks/batch-delete",
"handler": "Webhooks.deleteWebhooks",
"config": {
"policies": []

View File

@ -61,7 +61,7 @@ module.exports = {
},
async deleteWebhooks(ctx) {
const { ids } = ctx.query;
const { ids } = ctx.request.body;
if (!Array.isArray(ids) || ids.length === 0) {
return ctx.badRequest('ids must be an array of id');