clean up + default ntfs.sh server url

pull/1674/head
Philipp Dormann 3 years ago
parent 122e6a842b
commit 14dbe7c334
No known key found for this signature in database
GPG Key ID: 3BB9ADD52DCA4314

@ -8,9 +8,6 @@ class Ntfy extends NotificationProvider {
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully."; let okMsg = "Sent Successfully.";
try { try {
if (notification.ntfyserverurl && notification.ntfyserverurl.endsWith("/")) {
notification.ntfyserverurl = notification.ntfyserverurl.slice(0, -1);
}
await axios.post(`${notification.ntfyserverurl}`, { await axios.post(`${notification.ntfyserverurl}`, {
"topic": notification.ntfytopic, "topic": notification.ntfytopic,
"message": msg, "message": msg,

@ -22,6 +22,7 @@
export default { export default {
mounted() { mounted() {
if (typeof this.$parent.notification.ntfyPriority === "undefined") { if (typeof this.$parent.notification.ntfyPriority === "undefined") {
this.$parent.notification.ntfyserverurl = "https://ntfy.sh";
this.$parent.notification.ntfyPriority = 5; this.$parent.notification.ntfyPriority = 5;
} }
}, },

Loading…
Cancel
Save