fix(bookings): increase admin bookings limit validation to 500
Frontend sends limit=200 which exceeded the le=100 validation, causing 422 errors on the History page for managers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -729,7 +729,7 @@ def get_all_bookings(
|
|||||||
user_id: Annotated[int | None, Query()] = None,
|
user_id: Annotated[int | None, Query()] = None,
|
||||||
property_id: Annotated[int | None, Query()] = None,
|
property_id: Annotated[int | None, Query()] = None,
|
||||||
start: Annotated[datetime | None, Query(description="Start datetime (ISO format)")] = None,
|
start: Annotated[datetime | None, Query(description="Start datetime (ISO format)")] = None,
|
||||||
limit: Annotated[int, Query(ge=1, le=100)] = 20,
|
limit: Annotated[int, Query(ge=1, le=500)] = 20,
|
||||||
db: Annotated[Session, Depends(get_db)] = None, # type: ignore[assignment]
|
db: Annotated[Session, Depends(get_db)] = None, # type: ignore[assignment]
|
||||||
current_admin: Annotated[User, Depends(get_current_manager_or_superadmin)] = None, # type: ignore[assignment]
|
current_admin: Annotated[User, Depends(get_current_manager_or_superadmin)] = None, # type: ignore[assignment]
|
||||||
) -> list[BookingPendingDetail]:
|
) -> list[BookingPendingDetail]:
|
||||||
|
|||||||
Reference in New Issue
Block a user