From 0454f935083e2bf5ff480b9c99f29d79a4f8d72c Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 30 Apr 2025 17:39:10 +0800 Subject: [PATCH] Add SpugPush notification provider --- server/notification-providers/spugpush.js | 7 +++++-- src/components/notifications/SpugPush.vue | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/notification-providers/spugpush.js b/server/notification-providers/spugpush.js index a0c2ec37d..61574cab9 100644 --- a/server/notification-providers/spugpush.js +++ b/server/notification-providers/spugpush.js @@ -5,6 +5,9 @@ class SpugPush extends NotificationProvider { name = "SpugPush"; + /** + * @inheritdoc + */ async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; try { @@ -25,11 +28,11 @@ class SpugPush extends NotificationProvider { /** * Get the formatted target for message - * @param {?Object} monitorJSON Monitor details (For Up/Down only) + * @param {object} monitorJSON Monitor details (For Up/Down only) * @returns {string} Formatted target */ getTarget(monitorJSON) { - let target = '-' + let target = "-"; if (monitorJSON["hostname"]) { target = monitorJSON["hostname"]; if (monitorJSON["port"]) { diff --git a/src/components/notifications/SpugPush.vue b/src/components/notifications/SpugPush.vue index ff45071d8..3161eadcb 100644 --- a/src/components/notifications/SpugPush.vue +++ b/src/components/notifications/SpugPush.vue @@ -4,7 +4,7 @@ - https://push.spug.cc + https://push.spug.cc