Files
HealthLog/src/app/api
Marc-André Bombeck 341483de3f fix(medications): swallow concurrent-projection duplicates in intake backfill
PR #191 added a today-window backfill to /api/medications/intake. The
v1.4.39.4 dashboard symmetry fix wires the exact same projection into
/api/dashboard/summary, which means two parallel routes can now race
the same (userId, medicationId, scheduledFor, REMINDER) row between
their existence probes and createMany calls. The @@unique on
(userId, medicationId, scheduledFor, source) is the structural
backstop; without skipDuplicates: true the loser of that race would
surface a constraint violation as a 5xx.

Pair the createMany with skipDuplicates: true so Postgres swallows the
rejected rows and both routes still return 2xx. Matches the same flag
the dashboard route ships with.
2026-05-21 11:19:04 +02:00
..
2026-05-14 23:49:32 +02:00
2026-05-14 23:49:32 +02:00
2026-05-16 14:19:57 +02:00
2026-05-17 19:07:03 +02:00
2026-05-16 03:17:00 +02:00
2026-05-12 22:33:35 +02:00
2026-05-12 22:33:35 +02:00
2026-05-14 23:49:32 +02:00
2026-05-14 23:49:32 +02:00
2026-05-12 22:33:35 +02:00
2026-05-16 12:37:55 +02:00
2026-05-17 23:46:09 +02:00
2026-05-16 09:28:40 +02:00
2026-05-14 23:49:32 +02:00