mirror of
https://github.com/plankanban/planka.git
synced 2025-12-22 09:15:37 +03:00
feat: Move webhooks configuration from environment variable to UI
This commit is contained in:
@@ -62,8 +62,11 @@ module.exports = {
|
||||
);
|
||||
});
|
||||
|
||||
const webhooks = await Webhook.qm.getAll();
|
||||
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'notificationServiceCreate',
|
||||
webhooks,
|
||||
event: Webhook.Events.NOTIFICATION_SERVICE_CREATE,
|
||||
buildData: () => ({
|
||||
item: notificationService,
|
||||
included: {
|
||||
|
||||
@@ -48,8 +48,11 @@ module.exports = {
|
||||
inputs.request,
|
||||
);
|
||||
|
||||
const webhooks = await Webhook.qm.getAll();
|
||||
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'notificationServiceCreate',
|
||||
webhooks,
|
||||
event: Webhook.Events.NOTIFICATION_SERVICE_CREATE,
|
||||
buildData: () => ({
|
||||
item: notificationService,
|
||||
included: {
|
||||
|
||||
@@ -49,8 +49,11 @@ module.exports = {
|
||||
);
|
||||
});
|
||||
|
||||
const webhooks = await Webhook.qm.getAll();
|
||||
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'notificationServiceDelete',
|
||||
webhooks,
|
||||
event: Webhook.Events.NOTIFICATION_SERVICE_DELETE,
|
||||
buildData: () => ({
|
||||
item: notificationService,
|
||||
included: {
|
||||
|
||||
@@ -35,8 +35,11 @@ module.exports = {
|
||||
inputs.request,
|
||||
);
|
||||
|
||||
const webhooks = await Webhook.qm.getAll();
|
||||
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'notificationServiceDelete',
|
||||
webhooks,
|
||||
event: Webhook.Events.NOTIFICATION_SERVICE_DELETE,
|
||||
buildData: () => ({
|
||||
item: notificationService,
|
||||
included: {
|
||||
|
||||
@@ -55,8 +55,11 @@ module.exports = {
|
||||
);
|
||||
});
|
||||
|
||||
const webhooks = await Webhook.qm.getAll();
|
||||
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'notificationServiceUpdate',
|
||||
webhooks,
|
||||
event: Webhook.Events.NOTIFICATION_SERVICE_UPDATE,
|
||||
buildData: () => ({
|
||||
item: notificationService,
|
||||
included: {
|
||||
|
||||
@@ -41,8 +41,11 @@ module.exports = {
|
||||
inputs.request,
|
||||
);
|
||||
|
||||
const webhooks = await Webhook.qm.getAll();
|
||||
|
||||
sails.helpers.utils.sendWebhooks.with({
|
||||
event: 'notificationServiceUpdate',
|
||||
webhooks,
|
||||
event: Webhook.Events.NOTIFICATION_SERVICE_UPDATE,
|
||||
buildData: () => ({
|
||||
item: notificationService,
|
||||
included: {
|
||||
|
||||
Reference in New Issue
Block a user