mirror of
https://github.com/plankanban/planka.git
synced 2025-12-16 09:13:18 +03:00
feat: Webhooks configuration, all events support, refactoring
This commit is contained in:
@@ -28,6 +28,10 @@ module.exports = {
|
||||
custom: valuesValidator,
|
||||
required: true,
|
||||
},
|
||||
actorUser: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
request: {
|
||||
type: 'ref',
|
||||
},
|
||||
@@ -109,11 +113,12 @@ module.exports = {
|
||||
);
|
||||
});
|
||||
|
||||
await sails.helpers.utils.sendWebhook.with({
|
||||
event: 'PROJECT_UPDATE',
|
||||
data: project,
|
||||
projectId: project.id,
|
||||
user: inputs.request.currentUser,
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'projectUpdate',
|
||||
data: {
|
||||
item: project,
|
||||
},
|
||||
user: inputs.actorUser,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user