diff --git a/Tranga/Server.cs b/Tranga/Server.cs index 77e2fba..3ea53c7 100644 --- a/Tranga/Server.cs +++ b/Tranga/Server.cs @@ -492,12 +492,13 @@ public class Server : GlobalBase }else if (notificationConnectorType is NotificationConnector.NotificationConnectorType.Ntfy) { if (!requestVariables.TryGetValue("ntfyUrl", out string? ntfyUrl) || - !requestVariables.TryGetValue("ntfyAuth", out string? ntfyAuth)) + !requestVariables.TryGetValue("ntfyUser", out string? ntfyUser)|| + !requestVariables.TryGetValue("ntfyPass", out string? ntfyPass)) { SendResponse(HttpStatusCode.BadRequest, response); break; } - AddNotificationConnector(new Ntfy(this, ntfyUrl, ntfyAuth)); + AddNotificationConnector(new Ntfy(this, ntfyUrl, ntfyUser, ntfyPass, null)); SendResponse(HttpStatusCode.Accepted, response); } else @@ -534,12 +535,13 @@ public class Server : GlobalBase }else if (notificationConnectorType is NotificationConnector.NotificationConnectorType.Ntfy) { if (!requestVariables.TryGetValue("ntfyUrl", out string? ntfyUrl) || - !requestVariables.TryGetValue("ntfyAuth", out string? ntfyAuth)) + !requestVariables.TryGetValue("ntfyUser", out string? ntfyUser)|| + !requestVariables.TryGetValue("ntfyPass", out string? ntfyPass)) { SendResponse(HttpStatusCode.BadRequest, response); break; } - notificationConnector = new Ntfy(this, ntfyUrl, ntfyAuth); + notificationConnector = new Ntfy(this, ntfyUrl, ntfyUser, ntfyPass, null); } else {