1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-20 05:39:43 +02:00

feat: Webhooks configuration, all events support, refactoring

This commit is contained in:
Maksim Eltyshev 2024-06-12 00:51:36 +02:00
parent 3779bdb053
commit c065566c15
96 changed files with 1280 additions and 509 deletions

View file

@ -4,7 +4,7 @@ module.exports = {
type: 'json',
required: true,
},
user: {
actorUser: {
type: 'ref',
required: true,
},
@ -20,7 +20,7 @@ module.exports = {
const projectManager = await ProjectManager.create({
projectId: project.id,
userId: inputs.user.id,
userId: inputs.actorUser.id,
}).fetch();
sails.sockets.broadcast(
@ -32,11 +32,12 @@ module.exports = {
inputs.request,
);
await sails.helpers.utils.sendWebhook.with({
event: 'PROJECT_CREATE',
data: project,
projectId: project.id,
user: inputs.request.currentUser,
sails.helpers.utils.sendWebhooks.with({
event: 'projectCreate',
data: {
item: project,
},
user: inputs.actorUser,
});
return {