mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -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 = {
|
module.exports = {
|
||||||
docName: 'webhooks',
|
docName: 'webhooks',
|
||||||
|
|
||||||
add: {
|
add: {
|
||||||
statusCode: 201,
|
statusCode: 201,
|
||||||
headers: {},
|
headers: {},
|
||||||
options: [],
|
options: [],
|
||||||
|
data: [],
|
||||||
|
validation: {
|
||||||
|
data: {
|
||||||
|
event: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
target_url: {
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
permissions: true,
|
permissions: true,
|
||||||
query(frame) {
|
query(frame) {
|
||||||
return models.Webhook.getByEventAndTarget(
|
return models.Webhook.getByEventAndTarget(
|
||||||
|
@ -24,6 +36,7 @@ module.exports = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
edit: {
|
edit: {
|
||||||
permissions: true,
|
permissions: true,
|
||||||
data: [
|
data: [
|
||||||
|
@ -54,6 +67,7 @@ module.exports = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: {
|
destroy: {
|
||||||
statusCode: 204,
|
statusCode: 204,
|
||||||
headers: {},
|
headers: {},
|
||||||
|
|
Loading…
Add table
Reference in a new issue