mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-29 06:28:50 +03:00
feat: remove blank characters and ending '/' first
This commit is contained in:
parent
d7e12dc92d
commit
0684313ec9
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ class PushDeer extends NotificationProvider {
|
|||
let endpoint = "/message/push";
|
||||
let pushdeerlink;
|
||||
if (notification.pushdeerServer) {
|
||||
pushdeerlink = `${notification.pushdeerServer}${endpoint}`;
|
||||
// remove blank characters and ending '/'
|
||||
let customServer = notification.pushdeerServer.trim().replace(/\/*$/, "");
|
||||
pushdeerlink = `${customServer}${endpoint}`;
|
||||
} else {
|
||||
pushdeerlink = `${defaultServer}${endpoint}`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue