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: {