fix: standardize all collection POST routes to use trailing slash #61

Merged
cal merged 1 commits from fix/standardize-post-trailing-slashes into main 2026-03-10 00:41:22 +00:00
Owner

Summary

  • Standardizes all 20 @router.post('') routes to @router.post('/') across routers_v3/
  • Prevents 307 redirects that cause aiohttp to silently drop POST request bodies
  • Path-segment routes (/wipe/{game_id}, /creators, /s{season}/recalculate, etc.) left unchanged

Context

aiohttp follows 307 redirects but converts POST→GET, dropping the request body. When @router.post('') is used, FastAPI's redirect_slashes=True (default) issues a 307 for requests to /endpoint/, causing silent data loss. This was the root cause of scorecard play/decision submissions failing.

Companion PR: cal/major-domo-v2#74

Test plan

  • All 20 router files updated consistently
  • No path-segment routes modified
  • stratplay/crud.py already used '/' — confirmed unchanged
  • No remaining @router.post('') in codebase

🤖 Generated with Claude Code

## Summary - Standardizes all 20 `@router.post('')` routes to `@router.post('/')` across `routers_v3/` - Prevents 307 redirects that cause aiohttp to silently drop POST request bodies - Path-segment routes (`/wipe/{game_id}`, `/creators`, `/s{season}/recalculate`, etc.) left unchanged ## Context aiohttp follows 307 redirects but converts POST→GET, dropping the request body. When `@router.post('')` is used, FastAPI's `redirect_slashes=True` (default) issues a 307 for requests to `/endpoint/`, causing silent data loss. This was the root cause of scorecard play/decision submissions failing. Companion PR: cal/major-domo-v2#74 ## Test plan - [x] All 20 router files updated consistently - [x] No path-segment routes modified - [x] `stratplay/crud.py` already used `'/'` — confirmed unchanged - [x] No remaining `@router.post('')` in codebase 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cal added 1 commit 2026-03-10 00:35:00 +00:00
fix: standardize all collection POST routes to use trailing slash
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m38s
9ec69f9f2c
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>
cal merged commit 43a6ed1c74 into main 2026-03-10 00:41:22 +00:00
cal deleted branch fix/standardize-post-trailing-slashes 2026-03-10 00:41:23 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 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/major-domo-database#61
No description provided.