mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-09 22:33:00 +08:00
feat: remove blank characters and ending '/' first
This commit is contained in:
@@ -12,7 +12,9 @@ class PushDeer extends NotificationProvider {
|
|||||||
let endpoint = "/message/push";
|
let endpoint = "/message/push";
|
||||||
let pushdeerlink;
|
let pushdeerlink;
|
||||||
if (notification.pushdeerServer) {
|
if (notification.pushdeerServer) {
|
||||||
pushdeerlink = `${notification.pushdeerServer}${endpoint}`;
|
// remove blank characters and ending '/'
|
||||||
|
let customServer = notification.pushdeerServer.trim().replace(/\/*$/, "");
|
||||||
|
pushdeerlink = `${customServer}${endpoint}`;
|
||||||
} else {
|
} else {
|
||||||
pushdeerlink = `${defaultServer}${endpoint}`;
|
pushdeerlink = `${defaultServer}${endpoint}`;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user