mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-08-19 09:25:56 -05:00
Remove some validation from deckSleeves API field
This fixes a bug where certain actual sleeve IDs were rejected. Thanks to a Discord user who reported this.
This commit is contained in:
@@ -298,7 +298,7 @@ internal static class ApiEndpoints {
|
||||
return;
|
||||
}
|
||||
var deckSleeves = 0;
|
||||
if (d.TryGetValue("deckSleeves", out var deckSleevesString) && (!int.TryParse(deckSleevesString, out deckSleeves) || deckSleeves is < 0 or >= 25)) {
|
||||
if (d.TryGetValue("deckSleeves", out var deckSleevesString) && !int.TryParse(deckSleevesString, out deckSleeves)) {
|
||||
response.SetErrorResponse(new(HttpStatusCode.BadRequest, "InvalidDeckSleeves", "Invalid deck sleeves."));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user