From e8814e84791eab036d2fb744d5d8a5d0547e0b3e Mon Sep 17 00:00:00 2001 From: Josua Frank Date: Wed, 8 Mar 2023 13:28:02 +0000 Subject: [PATCH] added option for ntfy access tokens --- server/notification-providers/ntfy.js | 4 ++++ src/components/notifications/Ntfy.vue | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/server/notification-providers/ntfy.js b/server/notification-providers/ntfy.js index 521137cd..f20d1293 100644 --- a/server/notification-providers/ntfy.js +++ b/server/notification-providers/ntfy.js @@ -13,6 +13,10 @@ class Ntfy extends NotificationProvider { headers = { "Authorization": "Basic " + Buffer.from(notification.ntfyusername + ":" + notification.ntfypassword).toString("base64"), }; + } else if (notification.ntfyaccesstoken) { + headers = { + "Authorization": "Bearer " + notification.ntfyaccesstoken, + }; } let data = { "topic": notification.ntfytopic, diff --git a/src/components/notifications/Ntfy.vue b/src/components/notifications/Ntfy.vue index df21c5c5..63d35d0b 100644 --- a/src/components/notifications/Ntfy.vue +++ b/src/components/notifications/Ntfy.vue @@ -27,6 +27,12 @@ +
+ +
+ +
+