From 66e69ee366337ac3d99fc8fee8a23f1f2217aa9c Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Thu, 16 Nov 2023 11:05:00 -0800 Subject: [PATCH] ReportingEndpoints: Dont send BadRequest on unknown level when redirecting grief reports to photos --- Refresh.GameServer/Endpoints/Game/ReportingEndpoints.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Refresh.GameServer/Endpoints/Game/ReportingEndpoints.cs b/Refresh.GameServer/Endpoints/Game/ReportingEndpoints.cs index f0217e46..d7878285 100644 --- a/Refresh.GameServer/Endpoints/Game/ReportingEndpoints.cs +++ b/Refresh.GameServer/Endpoints/Game/ReportingEndpoints.cs @@ -41,10 +41,6 @@ public Response UploadReport(RequestContext context, GameDatabaseContext databas return BadRequest; } - //If the level is specified but its invalid, return BadRequest - if (body.LevelId != 0 && level == null) - return BadRequest; - if (user.RedirectGriefReportsToPhotos) { List subjects = new(); @@ -87,6 +83,10 @@ public Response UploadReport(RequestContext context, GameDatabaseContext databas return OK; } + //If the level is specified but its invalid, return BadRequest + if (body.LevelId != 0 && level == null) + return BadRequest; + //Basic validation if (body.Players is { Length: > 4 } || body.ScreenElements is { Player.Length: > 4 }) return BadRequest;