Skip to content

Commit

Permalink
search-api: Use same max page size as before
Browse files Browse the repository at this point in the history
  • Loading branch information
jnatten committed Dec 16, 2024
1 parent 0e002c5 commit 2fa48e8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ trait GetSearchQueryParams {
.derived[GetSearchQueryParams]
.validate {
Validator.custom {
case q if q.page < 1 => Invalid("page must be greater than 0")
case q if q.pageSize < 1 || q.pageSize > 100 => Invalid("page-size must be between 1 and 100")
case _ => Valid
case q if q.page < 1 => Invalid("page must be greater than 0")
case q if q.pageSize < 1 || q.pageSize > props.MaxPageSize =>
Invalid(s"page-size must be between 1 and ${props.MaxPageSize}")
case _ => Valid
}
}
}
Expand Down

0 comments on commit 2fa48e8

Please sign in to comment.