mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
GET/PATCH /api/anamnesis/emergency, wrapped in apiHandler. The PATCH validates a partial body with per-field length caps, builds the Prisma data field-by-field from the parsed input (never a spread), narrows the user from requireAuth rather than the body, encrypts the free text on write, and audits the change. The GET decrypts fail-soft for the form prefill. Registers the OpenAPI operations and schema. An integration test reads the row back to prove the write lands.
7 lines
303 B
TypeScript
7 lines
303 B
TypeScript
/** Query keys for the bounded, read-only profile summary surface. */
|
|
export const profileKeys = {
|
|
profileSummary: () => ["profile", "summary"] as const,
|
|
/** Emergency ("Notfalldaten") profile (`GET`/`PATCH /api/anamnesis/emergency`). */
|
|
emergencyProfile: () => ["emergency-profile"] as const,
|
|
};
|