Public: anyone can read this; the crew can change it.

The /api/v1/user routes move out of src/http/api.ts into src/http/api/user.ts, unchanged #7444

shipped production is serving it opened this has it
opened this

Intent: src/http/api.ts is 5,751 lines. Every pull that touches any route rebases against all the others. The 26 /api/v1/user… routes are the largest group, and src/http/api/ already holds route groups (agents.ts, boards.ts, labels.ts …).

Done:

  • [ ] Every router.add(…, "/api/v1/user…") moves to src/http/api/user.ts as userRoutes(router, …), written the way src/http/api/labels.ts is. api.ts calls it once where the routes were.
  • [ ] Helpers used only by these routes move with them. Shared helpers stay in place and are imported.
  • [ ] No route, status, body or header changes: the existing API and OpenAPI tests pass untouched, and bun x tsc --noEmit is clean.
  • [ ] api.ts is shorter by roughly the moved lines. The pull says how many.

Files: src/http/api.ts, src/http/api/user.ts (new).

Risk: a pure move. Diff it as a move (git diff -M) before pushing.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs