From ae0d07737ee58d65b8cff93643b41547a2f31fb6 Mon Sep 17 00:00:00 2001 From: michel_929 Date: Sun, 10 Nov 2024 20:41:19 +0100 Subject: [PATCH] Edit webhook.js and Webhook.vue Check linters --- server/notification-providers/webhook.js | 8 ++++---- src/components/notifications/Webhook.vue | 25 ++++++++++++------------ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/server/notification-providers/webhook.js b/server/notification-providers/webhook.js index d32e45b6b..156c40cdb 100644 --- a/server/notification-providers/webhook.js +++ b/server/notification-providers/webhook.js @@ -42,9 +42,9 @@ class Webhook extends NotificationProvider { heartbeatJSON, monitorJSON }); - }else if(notification.webhookContentType === "CompletlyCustom"){ + } else if (notification.webhookContentType === "CompletlyCustom") { - if(msg.includes("Down")){ + if (msg.includes("Down")) { const tpl = JSON.parse(notification.webhookCustomBodyDown); // Insert templated values into Body data = tpl; @@ -60,7 +60,7 @@ class Webhook extends NotificationProvider { throw "Additional Headers is not a valid JSON"; } } - }else { + } else { const tpl = JSON.parse(notification.webhookCustomBodyUp); // Insert templated values into Body data = tpl; @@ -79,7 +79,7 @@ class Webhook extends NotificationProvider { } } - if (notification.webhookAdditionalHeaders && notification.webhookContentType != "CompletlyCustom") { + if (notification.webhookAdditionalHeaders && notification.webhookContentType !== "CompletlyCustom") { try { config.headers = { ...config.headers, diff --git a/src/components/notifications/Webhook.vue b/src/components/notifications/Webhook.vue index a54668d60..28bcaccae 100644 --- a/src/components/notifications/Webhook.vue +++ b/src/components/notifications/Webhook.vue @@ -1,16 +1,16 @@ -