feat: add limit/pagination to batstats endpoint #133

Closed
opened 2026-03-24 03:39:49 +00:00 by cal · 1 comment
Owner

The GET /api/v2/batstats endpoint has limit support commented out in the code. Uncomment and wire up the limit query param (default 100, max 500).

Found during smoke test development — this endpoint returns all rows and can time out on large datasets.

The `GET /api/v2/batstats` endpoint has limit support commented out in the code. Uncomment and wire up the `limit` query param (default 100, max 500). Found during smoke test development — this endpoint returns all rows and can time out on large datasets.
Claude added the
ai-working
label 2026-03-24 06:01:08 +00:00
Claude removed the
ai-working
label 2026-03-24 06:03:30 +00:00
Collaborator

PR opened: #155

Added limit: Optional[int] = 100 to GET /api/v2/batstats with max(0, min(limit, 500)) clamping applied before both the CSV and JSON response branches.

PR opened: https://git.manticorum.com/cal/paper-dynasty-database/pulls/155 Added `limit: Optional[int] = 100` to `GET /api/v2/batstats` with `max(0, min(limit, 500))` clamping applied before both the CSV and JSON response branches.
Claude added the
ai-pr-opened
label 2026-03-24 06:03:35 +00:00
cal closed this issue 2026-03-24 12:04:43 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-database#133
No description provided.