You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Collection PATCH route: route-level test and single entry read #468
Two leftovers from #465 (fix for #454), both in PATCH /api/collection/:id (src/routes/collection.ts).
Route test.Keep collection entries linked when only notes or dates change #465 tests updateCollectionEntry directly. Add a route test that posts the real edit-dialog form body (both names, notes changed) for a linked entry and asserts group_id is unchanged. This catches drift between collection-edit.pug, updateCollectionSchema and the DB layer.
Double read. The route loads the entry with getCollectionEntry for the ownership check, then updateCollectionEntry loads it again to compare names. Pass the already-loaded entry (or its shown names) in, or move the comparison into the route.
Related proposal #542 moves collection linking into a transactional domain operation and introduces typed refusals. This issue retains its PATCH regression test and duplicate-read scope. Coordinate the ownership/entry-reading boundary; do not move business rules into routes merely to save a read.
Activity
jra3 commentedon Oct 13, 2026
Related proposal #542 moves collection linking into a transactional domain operation and introduces typed refusals. This issue retains its PATCH regression test and duplicate-read scope. Coordinate the ownership/entry-reading boundary; do not move business rules into routes merely to save a read.
Test the collection PATCH route and read the entry once (#468) (#582)