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:
parent
f0680831c2
commit
b22dba0d11
128 changed files with 2077 additions and 206 deletions
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue