mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-25 21:15:55 +00:00
Update whapi.js
More concise and reasonable regular expression fix
This commit is contained in:
parent
84d67a239b
commit
16ab2425e5
1 changed files with 1 additions and 1 deletions
|
@ -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(/([^\/])\/+$/, "$1") + "/messages/text";
|
||||
|
||||
await axios.post(url, data, config);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue