mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Webhooks configuration, all events support, refactoring
This commit is contained in:
parent
193daf6cfb
commit
87683fe523
96 changed files with 1280 additions and 509 deletions
|
@ -4,11 +4,23 @@ module.exports = {
|
|||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
project: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
board: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
list: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
card: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
board: {
|
||||
actorUser: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
|
@ -30,13 +42,18 @@ module.exports = {
|
|||
inputs.request,
|
||||
);
|
||||
|
||||
await sails.helpers.utils.sendWebhook.with({
|
||||
event: 'ACTION_DELETE',
|
||||
data: action,
|
||||
projectId: inputs.board.projectId,
|
||||
user: inputs.request.currentUser,
|
||||
card: inputs.card,
|
||||
board: inputs.board,
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'actionDelete',
|
||||
data: {
|
||||
item: action,
|
||||
included: {
|
||||
projects: [inputs.project],
|
||||
boards: [inputs.board],
|
||||
lists: [inputs.list],
|
||||
cards: [inputs.card],
|
||||
},
|
||||
},
|
||||
user: inputs.actorUser,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue