Add SpugPush notification provider

This commit is contained in:
vapao 2025-04-30 17:39:10 +08:00
parent 73c9e27b70
commit 0454f93508
2 changed files with 6 additions and 3 deletions

View file

@ -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"]) {