Asep Haryana SaputraandClaude Opus 4.7 7712a5c6a1 fix: prevent duplicate expert reviews
In POST /reviews/:diagnosisId, perform the conditional diagnoses update
first with .returning() to determine whether a row was updated. The update
WHERE includes both id and status 'needs_review'. If no row is returned,
return badRequest and do not insert an expert review. Only after a
successful update insert expertReviews. This prevents concurrent reviewers
from both inserting review rows when only one update should win.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:34:02 +00:00
2026-05-22 14:23:45 +08:00
2026-05-22 14:23:45 +08:00
2026-05-22 13:06:43 +00:00
S
Description
ZeaVis-Edu mirror
55 MiB
Languages
Jupyter Notebook 85.8%
TypeScript 10.4%
Python 1.6%
Rust 1.4%
Makefile 0.2%
Other 0.2%