feat(backend): increase per_page cap to 500 in bookings list handler

Raise per_page limit from 100 to 500 in parseGetAllBookingsRequest to support large booking lists. Add test coverage for per_page=500 acceptance and per_page=600 rejection (fallback to 10).

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-15 20:27:41 +01:00
co-authored by Sisyphus
parent 2b942a48bd
commit 459adf7001
2 changed files with 72 additions and 1 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ func parseGetAllBookingsRequest(r *http.Request) GetAllBookingsRequest {
}
}
if perPageStr := r.URL.Query().Get("per_page"); perPageStr != "" {
if perPage, err := strconv.Atoi(perPageStr); err == nil && perPage > 0 && perPage <= 100 {
if perPage, err := strconv.Atoi(perPageStr); err == nil && perPage > 0 && perPage <= 500 {
req.PerPage = perPage
}
}