1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00

feat: Move webhooks configuration from environment variable to UI

This commit is contained in:
Maksim Eltyshev 2025-07-04 22:04:11 +02:00
parent f0680831c2
commit b22dba0d11
128 changed files with 2077 additions and 206 deletions

View file

@ -38,8 +38,11 @@ module.exports = {
inputs.request,
);
const webhooks = await Webhook.qm.getAll();
sails.helpers.utils.sendWebhooks.with({
event: 'listClear',
webhooks,
event: Webhook.Events.LIST_CLEAR,
buildData: () => ({
item: inputs.record,
included: {

View file

@ -72,8 +72,11 @@ module.exports = {
inputs.request,
);
const webhooks = await Webhook.qm.getAll();
sails.helpers.utils.sendWebhooks.with({
event: 'listCreate',
webhooks,
event: Webhook.Events.LIST_CREATE,
buildData: () => ({
item: list,
included: {

View file

@ -57,8 +57,11 @@ module.exports = {
inputs.request,
);
const webhooks = await Webhook.qm.getAll();
sails.helpers.utils.sendWebhooks.with({
event: 'listDelete',
webhooks,
event: Webhook.Events.LIST_DELETE,
buildData: () => ({
item: list,
included: {

View file

@ -91,10 +91,13 @@ module.exports = {
inputs.request,
);
const webhooks = await Webhook.qm.getAll();
cards.forEach((card) => {
// TODO: with prevData?
sails.helpers.utils.sendWebhooks.with({
event: 'cardUpdate',
webhooks,
event: Webhook.Events.CARD_UPDATE,
buildData: () => ({
item: card,
included: {

View file

@ -100,10 +100,13 @@ module.exports = {
inputs.request,
);
const webhooks = await Webhook.qm.getAll();
cards.forEach((card) => {
// TODO: with prevData?
sails.helpers.utils.sendWebhooks.with({
event: 'cardUpdate',
webhooks,
event: Webhook.Events.CARD_UPDATE,
buildData: () => ({
item: card,
included: {

View file

@ -84,8 +84,11 @@ module.exports = {
inputs.request,
);
const webhooks = await Webhook.qm.getAll();
sails.helpers.utils.sendWebhooks.with({
event: 'listUpdate',
webhooks,
event: Webhook.Events.LIST_UPDATE,
buildData: () => ({
item: list,
included: {