fix the bug of regular item

This commit is contained in:
DayShift 2025-01-25 19:46:17 +08:00
parent af51ec3f8d
commit 2098d34c5b
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ class PushDeer extends NotificationProvider {
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
const okMsg = "Sent Successfully.";
const serverUrl = notification.pushdeerServer || "https://api2.pushdeer.com";
const url = `${serverUrl.trim().replace(/\/*$/, "")}/message/push`;
const url = `${serverUrl.trim().replace(/(?<!\/)\/*$/, "")}/message/push`;
let valid = msg != null && monitorJSON != null && heartbeatJSON != null;

View file

@ -24,7 +24,7 @@ class Whapi extends NotificationProvider {
"body": msg,
};
let url = (notification.whapiApiUrl || "https://gate.whapi.cloud/").replace(/\/+$/, "") + "/messages/text";
let url = (notification.whapiApiUrl || "https://gate.whapi.cloud/").replace(/(?<!\/)\/*$/, "") + "/messages/text";
await axios.post(url, data, config);