2
0

Fix #178 wrong check on parsing variable aprilfoolsmode

This commit is contained in:
Glax 2024-04-27 17:53:08 +02:00
parent 4692cc297a
commit 2e8b896f3b

View File

@ -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;