Commit Graph

11 Commits

Author SHA1 Message Date
Cal Corum
b0fd1d89ea fix: eliminate N+1 queries in batch POST endpoints (#25)
Replace per-row Team/Player lookups with bulk IN-list queries before
the validation loop in post_transactions, post_results, post_schedules,
and post_batstats. A 50-move batch now uses 2 queries instead of 150.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 16:29:58 -05:00
Cal Corum
9ec69f9f2c fix: standardize all collection POST routes to use trailing slash
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m38s
aiohttp follows 307 redirects but converts POST to GET, silently
dropping the request body. Standardize all @router.post('') to
@router.post('/') so the canonical URL always has a trailing slash,
preventing 307 redirects when clients POST with trailing slashes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:34:28 -05:00
Cal Corum
6af278d737 fix: case-insensitive team_abbrev filter in transactions endpoint
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m7s
The team_abbrev filter uppercased input but compared against mixed-case
DB values (e.g. "MKEMiL"), causing affiliate roster transactions to be
silently dropped from results. Use fn.UPPER() on the DB column to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:35:12 -05:00
Cal Corum
c05d00d60e DB Error Handling
Added error handling wrapper and fixed SQLite -> Postgres issues
2025-08-20 19:33:40 -05:00
Cal Corum
cd1321553e Logging updates 2024-12-16 09:03:23 -06:00
Cal Corum
4380c26319 Add Swagger support 2024-07-14 13:23:37 -05:00
Cal Corum
5a5146c1cf Added logging to each router 2023-07-26 14:06:21 -05:00
Cal Corum
115a50c50a Typo fixes 2023-07-17 23:08:53 -05:00
Cal Corum
fb29f8bff3 Update with Sheets testing
Changed to /battingstats/totals
Updated some parameters to queries
2023-05-26 12:48:40 -05:00
Cal Corum
782804424d Fix relative package issues 2023-05-05 11:06:11 -05:00
Cal Corum
54b0485599 /standings, /teams, /transactions added 2023-03-22 15:56:10 -05:00