0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Required "event" & "target_url" for webhook creation

refs #10461
This commit is contained in:
kirrg001 2019-02-07 23:21:59 +01:00
parent f8a286869a
commit e1436e2985

View file

@ -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: {},