From 14dbe7c334118efd6fa2c47e6d5c8f842e16811b Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 23 May 2022 21:11:01 +0200 Subject: [PATCH] clean up + default ntfs.sh server url --- server/notification-providers/ntfy.js | 3 --- src/components/notifications/Ntfy.vue | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/server/notification-providers/ntfy.js b/server/notification-providers/ntfy.js index 8a0ef625..442d8068 100644 --- a/server/notification-providers/ntfy.js +++ b/server/notification-providers/ntfy.js @@ -8,9 +8,6 @@ class Ntfy extends NotificationProvider { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; try { - if (notification.ntfyserverurl && notification.ntfyserverurl.endsWith("/")) { - notification.ntfyserverurl = notification.ntfyserverurl.slice(0, -1); - } await axios.post(`${notification.ntfyserverurl}`, { "topic": notification.ntfytopic, "message": msg, diff --git a/src/components/notifications/Ntfy.vue b/src/components/notifications/Ntfy.vue index 04bc1b9f..fd6abef5 100644 --- a/src/components/notifications/Ntfy.vue +++ b/src/components/notifications/Ntfy.vue @@ -22,6 +22,7 @@ export default { mounted() { if (typeof this.$parent.notification.ntfyPriority === "undefined") { + this.$parent.notification.ntfyserverurl = "https://ntfy.sh"; this.$parent.notification.ntfyPriority = 5; } },