support trailing slashes in gotify server url

This commit is contained in:
Philipp Dormann 2021-07-14 11:11:58 +02:00
parent ccf9d2ad5c
commit b0d0ecd900
No known key found for this signature in database
GPG Key ID: 3BB9ADD52DCA4314

View File

@ -21,6 +21,9 @@ class Notification {
} else if (notification.type === "gotify") {
try {
if (notification.gotifyserverurl.endsWith("/")) {
notification.gotifyserverurl = notification.gotifyserverurl.slice(0, -1);
}
await axios.post(`${notification.gotifyserverurl}/message?token=${notification.gotifyapplicationToken}`, {
"message": msg,
"priority": 8,