diff --git a/core/server/api/v2/webhooks.js b/core/server/api/v2/webhooks.js index cb96d1235c..daa81d5cfd 100644 --- a/core/server/api/v2/webhooks.js +++ b/core/server/api/v2/webhooks.js @@ -3,10 +3,22 @@ const common = require('../../lib/common'); module.exports = { docName: 'webhooks', + add: { statusCode: 201, headers: {}, options: [], + data: [], + validation: { + data: { + event: { + required: true + }, + target_url: { + required: true + } + } + }, permissions: true, query(frame) { return models.Webhook.getByEventAndTarget( @@ -24,6 +36,7 @@ module.exports = { }); } }, + edit: { permissions: true, data: [ @@ -54,6 +67,7 @@ module.exports = { }); } }, + destroy: { statusCode: 204, headers: {},