From a864b72e0355a2908f6a955ed37c203040aae7eb Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 29 Nov 2021 17:19:55 +0800 Subject: [PATCH] fix pushover for general message --- server/notification-providers/pushover.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/notification-providers/pushover.js b/server/notification-providers/pushover.js index 77ef1a3f0..52d13eef7 100644 --- a/server/notification-providers/pushover.js +++ b/server/notification-providers/pushover.js @@ -7,12 +7,12 @@ class Pushover extends NotificationProvider { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; - let pushoverlink = "https://api.pushover.net/1/messages.json" + let pushoverlink = "https://api.pushover.net/1/messages.json"; try { if (heartbeatJSON == null) { let data = { - "message": "Uptime Kuma Pushover testing successful.", + "message": msg, "user": notification.pushoveruserkey, "token": notification.pushoverapptoken, "sound": notification.pushoversounds, @@ -21,8 +21,8 @@ class Pushover extends NotificationProvider { "retry": "30", "expire": "3600", "html": 1, - } - await axios.post(pushoverlink, data) + }; + await axios.post(pushoverlink, data); return okMsg; } @@ -36,11 +36,11 @@ class Pushover extends NotificationProvider { "retry": "30", "expire": "3600", "html": 1, - } - await axios.post(pushoverlink, data) + }; + await axios.post(pushoverlink, data); return okMsg; } catch (error) { - this.throwGeneralAxiosError(error) + this.throwGeneralAxiosError(error); } }