chahinebrini
53d6e69512
feat(api): GET /api/profile/me/demographics endpoint
Read-counterpart zum existierenden PATCH/DELETE. Frontend braucht den endpoint
um nach Page-Reload die schon-gespeicherten Werte zu fetchen — sonst sieht User
leere Felder und denkt save funktioniert nicht.
- backend/server/db/profile.ts: getDemographics(userId) — SELECT der 9 fields +
demographics_consent_at + demographics_withdrawn_at
- backend/server/api/profile/me/demographics.get.ts: requireUser + getDemographics
+ ISO-string conversion. 404 wenn Profile-row fehlt.
- backend/tests/profile/demographics.get.test.ts: 5 vitest cases
(null fields, 404, populated, withdrawn, 401)
Response shape kompatibel mit PATCH-input (gleiche field names, camelCase) plus
metadata consentAt/withdrawnAt.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 21:31:53 +02:00
..
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-07 21:22:51 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-08 21:31:53 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00