mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
`GET /api/measurements` has five distinct read shapes (per-day drill-down, group-by-day, rollup-source coverage-fallback probe + fold re-read, live `date_trunc` aggregate, default findMany + count). Each relied on a shared `where` builder or a local `findMany` clause; none filtered `deletedAt`. The `GET /api/measurements/series` adapter for iOS read BP-SYS / BP-DIA / single-type series without the filter too. Pin `deletedAt: null` on the shared `where` so the count + raw findMany + group-by-day mode all inherit it; add the filter to the dayKey drill-down findMany, the coverage-fallback day-count probe, and the live `date_trunc` aggregate; thread the filter through the three series findMany calls. The `source=rollup` branch reads from `measurement_rollups` so the writer-side filter covers it. No `measurements/timeline` route exists yet — the file-set name was prospective.