mirror of
https://github.com/strapi/strapi.git
synced 2025-11-18 19:22:05 +00:00
Batch delete
This commit is contained in:
parent
99d76552ac
commit
1547fddaeb
@ -115,8 +115,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "DELETE",
|
"method": "POST",
|
||||||
"path": "/webhooks",
|
"path": "/webhooks/batch-delete",
|
||||||
"handler": "Webhooks.deleteWebhooks",
|
"handler": "Webhooks.deleteWebhooks",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": []
|
||||||
|
|||||||
@ -61,7 +61,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async deleteWebhooks(ctx) {
|
async deleteWebhooks(ctx) {
|
||||||
const { ids } = ctx.query;
|
const { ids } = ctx.request.body;
|
||||||
|
|
||||||
if (!Array.isArray(ids) || ids.length === 0) {
|
if (!Array.isArray(ids) || ids.length === 0) {
|
||||||
return ctx.badRequest('ids must be an array of id');
|
return ctx.badRequest('ids must be an array of id');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user