Files
HealthLog/src
Marc-André Bombeck bd3a4470e5 feat(api): expose the measurement-categories map as a public endpoint
Adds `GET /api/measurement-categories`, a thin projection of the
v1.4.30 `MEASUREMENT_CATEGORIES` overlay at
`src/lib/measurements/categories.ts`. iOS reads the response on cold
start to drive the HealthKit permission picker grouping; the future
web Insights nav and the Coach evidence shelf consume the same shape.

Response envelope carries a `version: 1` marker, an ordered
`categories` list with `labelKey` translation keys, and the
`assignments` map keyed on `MeasurementType`. `requireAuth()` gates
the route — any logged-in user passes — and the response carries
`Cache-Control: public, max-age=600` so clients honour a 10-minute
edge cache.

Locked per `.planning/RESPONSE-TO-IOS-TEAM-2026-05-16.md` §3 R1.
2026-05-16 13:09:27 +02:00
..