Skip to content

Commit

Permalink
fix: fixed conditional for parsing count query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamess-Lucass committed Jul 26, 2024
1 parent 45a4103 commit 91dc46a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override void OnActionExecuted(ActionExecutedContext context)
queryString.TryGetValue("count", out var countQuery);
var countString = countQuery.ToString();

if (bool.TryParse(countString, out bool count) && !string.IsNullOrEmpty(countString))
if (!bool.TryParse(countString, out bool count) && !string.IsNullOrEmpty(countString))
{
context.Result = new BadRequestObjectResult(new { Message = "The query parameter 'Count' could not be parsed to a boolean" });
return;
Expand Down

0 comments on commit 91dc46a

Please sign in to comment.