3.0 KiB
3.0 KiB
API Phase 4 Move Log
Date: 2026-03-17
Scope: Move transactions endpoints out of api/src/server.ts into a dedicated route module.
Route Registration Changes
- Added transactions route import in server.ts
- Registered transactions routes in server.ts
- New canonical route module: transactions.ts
- Removed inline transactions route blocks from
server.tsto avoid duplicate registration:POST /transactionsblockGET/PATCH/DELETE /transactionsblock
Endpoint Movements
POST /transactions
- Moved to transactions.ts
- References:
GET /transactions
- Moved to transactions.ts
- References:
PATCH /transactions/:id
- Moved to transactions.ts
- References:
DELETE /transactions/:id
- Moved to transactions.ts
- References:
Helper Ownership in Phase 4
- Shared helper injection from
server.ts:mutationRateLimitcomputeDepositSharescomputeWithdrawSharescomputeOverdraftSharescalculateNextDueDatetoBigparseCurrencyToCents
- Route-local helper:
isDatequery validator
Follow-ups To Revisit
- Split
POST /transactionsinto smaller internal handlers (variable_spendvsfixed_payment) after endpoint migration phases complete. - Replace broad
anyshapes in transaction where-clause/order composition with a typed query builder to reduce regression risk. - Reconcile test expectations for plan overdraft behavior (
OVERDRAFT_PLANvs current fixed-payment reconciliation semantics) before behavior changes in later phases.