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

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

shipped production is serving it opened this has it
opened this

Intent: same as the user-routes split. The 20 /api/v1/admin… routes are the next largest group in the 5,751-line src/http/api.ts.

Done:

  • [ ] Every router.add(…, "/api/v1/admin…") moves to src/http/api/admin.ts as adminRoutes(router, …), in the shape of src/http/api/labels.ts. api.ts calls it once.
  • [ ] Helpers used only by these routes move with them. The admin gates (src/http/admin_gate.ts) are imported, not copied.
  • [ ] No route, status, body or header changes: the existing tests pass untouched and bun x tsc --noEmit is clean. The pull says how many lines api.ts lost.

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

Risk: a pure move. If the user-routes split lands first, rebase; the two touch different blocks.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs