strat-gameplay-webapp/backend/app/api/routes
Cal Corum 701098881a CLAUDE: Add validation to prevent null team metadata in game creation
- Add validation in create_game() and quick_create_game() to ensure both
  teams are successfully fetched from SBA API before creating game
- Raise HTTP 400 with clear error message if team data cannot be fetched
- Add warning logs in get_teams_by_ids() when teams are missing from result
- Prevents games from being created with null team display info (names,
  abbreviations, colors, thumbnails)

Root cause: get_teams_by_ids() silently returned empty dict on API failures,
and game creation endpoints didn't validate the result.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 18:19:15 -06:00
..
__init__.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
auth.py CLAUDE: Add team ownership to auth flow (CRIT-002) 2026-01-13 20:28:08 -06:00
games.py CLAUDE: Add validation to prevent null team metadata in game creation 2026-01-24 18:19:15 -06:00
health.py CLAUDE: Add Alembic migrations and database session injection 2025-11-28 12:09:09 -06:00
schedule.py CLAUDE: Add SBA schedule integration with weekly matchup display 2026-01-14 23:39:31 -06:00
teams.py CLAUDE: Store team display info in DB and fix lineup auto-start 2026-01-17 08:43:26 -06:00