From 2e8b896f3ba03d8edd6c481e51f8b186f9b8b6e6 Mon Sep 17 00:00:00 2001 From: Glax Date: Sat, 27 Apr 2024 17:53:08 +0200 Subject: [PATCH] Fix #178 wrong check on parsing variable aprilfoolsmode --- Tranga/Server.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/Server.cs b/Tranga/Server.cs index 77e2fba..bef0941 100644 --- a/Tranga/Server.cs +++ b/Tranga/Server.cs @@ -410,7 +410,7 @@ public class Server : GlobalBase break; case "Settings/AprilFoolsMode": if (!requestVariables.TryGetValue("enabled", out string? aprilFoolsModeEnabledStr) || - bool.TryParse(aprilFoolsModeEnabledStr, out bool aprilFoolsModeEnabled)) + !bool.TryParse(aprilFoolsModeEnabledStr, out bool aprilFoolsModeEnabled)) { SendResponse(HttpStatusCode.BadRequest, response); break;