mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
Both POST arms of /api/measurements resolve the record rather than the caller. Every `userId: user.id` in the handler already meant "the record", so the bodies are untouched: the safety-floor check, the reminder satisfaction, the rollup recompute and the cache eviction are statements about the record and stay addressed to it. The two validation breadcrumbs move from a bare client create to auditLog(). That helper is the only writer that stamps the acting account, and a delegate's malformed payload filed without it reads as the owner's own typing.