From d44663c57c4105077f1329fefcb178b082444b56 Mon Sep 17 00:00:00 2001 From: Muhammed Hussein Karimi Date: Wed, 24 Aug 2022 09:37:15 +0430 Subject: [PATCH] provider name fix --- server/notification-providers/goalert.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/notification-providers/goalert.js b/server/notification-providers/goalert.js index cbd5e3d8..dce83941 100644 --- a/server/notification-providers/goalert.js +++ b/server/notification-providers/goalert.js @@ -4,7 +4,7 @@ const { UP } = require("../../src/util"); class GoAlert extends NotificationProvider { - name = "goalert"; + name = "GoAlert"; async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; @@ -13,9 +13,9 @@ class GoAlert extends NotificationProvider { token: notification.goAlertToken, summary: msg, }; - if (heartbeatJSON["status"] === UP) { - parameters["action"] = closeAction; - } + // if (heartbeatJSON["status"] === UP) { + // parameters["action"] = closeAction; + // } try { await axios.post(`${notification.goAlertBaseURL}/api/v2/generic/incoming`, { params: parameters, @@ -24,6 +24,7 @@ class GoAlert extends NotificationProvider { } catch (error) { let msg = (error.response.data) ? error.response.data : "Error without response"; + console.log(error) throw new Error(msg); } }