brackt/app/routes/api
Chris Parsons 34da0594d1
Fix draft timer creation for teams without existing timers (#26)
* Create timer when adding time to a team with no existing timer

When a commissioner tries to add time to a team that has no draft timer,
instead of returning a 404 error, create a new timer record with the
specified amount of time. Removing time still returns a 404 if no timer
exists (nothing to remove from).

https://claude.ai/code/session_016VpJKZZFNQQqzfmLu8pHoc

* Fix silent timer failures and missing seasonId filter in timer model

- draft.make-pick.ts: create a timer with the increment amount instead of
  logging a warning and silently skipping when no timer exists for the
  picking team
- draft.force-manual-pick.ts: same fix for the commissioner force-pick path;
  also unconditionally emit the timer-update socket event so clients always
  see the updated time
- models/draft-timer.ts: add seasonId parameter to getTeamTimer and
  updateTeamTimer so they cannot match the wrong season's timer when a team
  participates in multiple seasons

https://claude.ai/code/session_016VpJKZZFNQQqzfmLu8pHoc

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-22 17:27:16 -08:00
..
__tests__ feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
webhooks refactor: simplify user update logic in Clerk webhook handler to reuse findOrCreateUser 2025-10-14 21:50:07 -07:00
autodraft.update.ts refactor: update import paths to use absolute paths for better clarity and maintainability 2025-10-24 21:20:19 -07:00
draft.adjust-time-bank.ts Fix draft timer creation for teams without existing timers (#26) 2026-02-22 17:27:16 -08:00
draft.force-autopick.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.force-manual-pick.ts Fix draft timer creation for teams without existing timers (#26) 2026-02-22 17:27:16 -08:00
draft.make-pick.ts Fix draft timer creation for teams without existing timers (#26) 2026-02-22 17:27:16 -08:00
draft.pause.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.replace-pick.ts Add commissioner replace pick and draft rollback features (#18) 2026-02-20 22:47:29 -08:00
draft.resume.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.rollback.ts Refactor autodraft chain logic and improve timer handling (#25) 2026-02-22 17:02:35 -08:00
draft.start.ts Refactor autodraft chain logic and improve timer handling (#25) 2026-02-22 17:02:35 -08:00
queue.add.ts feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
queue.clear.ts feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
queue.remove.ts feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
queue.reorder.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00