From 906711e968a44d5d13e1c0295f3a5e0b7fef4cd4 Mon Sep 17 00:00:00 2001 From: hunterlong Date: Fri, 26 Jun 2020 18:20:48 -0700 Subject: [PATCH] notifier test handler possible fix --- CHANGELOG.md | 1 + handlers/notifications.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0e82971..cf99f370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Added Custom oAuth Authentication method - Fixed setup form not creating user from values inputted in form - Fixed issues with Telegram Notifier +- Modified notifier test handler to return notifier based on URL, not JSON payload # 0.90.55 (06-18-2020) - Added 404 page diff --git a/handlers/notifications.go b/handlers/notifications.go index daa82de7..b809c7e2 100644 --- a/handlers/notifications.go +++ b/handlers/notifications.go @@ -70,7 +70,7 @@ type testNotificationReq struct { func testNotificationHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) - _, err := notifications.Find(vars["notifier"]) + n, err := notifications.Find(vars["notifier"]) if err != nil { sendErrorJson(err, w, r) return @@ -82,7 +82,7 @@ func testNotificationHandler(w http.ResponseWriter, r *http.Request) { return } - notif := services.ReturnNotifier(req.Notification.Method) + notif := services.ReturnNotifier(n.Method) var out string if req.Method == "success" {