mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
f8a286869a
commit
e1436e2985
1 changed files with 14 additions and 0 deletions
|
@ -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: {},
|
||||
|
|
Loading…
Add table
Reference in a new issue