mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
feat: Webhooks configuration, all events support, refactoring
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user