Files
SkyMoney/docs/api-phase7-move-log.md
Ricearoni1245 952684fc25
All checks were successful
Deploy / deploy (push) Successful in 1m32s
Security Tests / security-non-db (push) Successful in 21s
Security Tests / security-db (push) Successful in 27s
phase 8: site-access and admin simplified and compacted
2026-03-18 06:43:19 -05:00

2.1 KiB

API Phase 7 Move Log

Date: 2026-03-17
Scope: Move dashboard read endpoints out of api/src/server.ts into a dedicated route module.

Route Registration Changes

  • Added dashboard route import in server.ts
  • Registered dashboard routes in server.ts
  • New canonical route module: dashboard.ts
  • Removed inline dashboard route blocks from server.ts to avoid duplicate registration:
    • GET /dashboard
    • GET /crisis-status

Endpoint Movements

  1. GET /dashboard
  1. GET /crisis-status
  • Original: server.ts line 1330
  • Moved to dashboard.ts
  • References:
    • No direct web/api wrapper references currently found via repo search.
    • Endpoint remains available for API consumers and future UI wiring.

Helper Ownership in Phase 7

  • Route-local helpers in dashboard.ts:
    • monthKey
    • monthLabel
    • buildMonthBuckets
    • DAY_MS
  • Reused allocator date helpers:
    • static getUserMidnightFromDateOnly
    • dynamic import of getUserMidnight and calculateNextPayday for parity with pre-move logic

Verification

  1. Build
  • cd api && npm run build
  1. Focused tests
  • cd api && npm run test -- tests/auth.routes.test.ts
  • Result: blocked by local DB connectivity (127.0.0.1:5432 unavailable), suite skipped/failed before endpoint assertions.