8000 Collection PATCH route: route-level test and single entry read · Issue #468 · jra3/mulm · GitHub
[go: up one dir, main page]

Skip to content

Collection PATCH route: route-level test and single entry read #468

Closed

Description

@jra3

Two leftovers from #465 (fix for #454), both in PATCH /api/collection/:id (src/routes/collection.ts).

  1. 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.
  2. 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.

Follow-up from #454 / #465 review.

Activity

  1. added
    testingTesting, test coverage, and quality assurance
    priority:lowLow priority - nice to have
    ready-for-agentFully specified, ready for an AFK agent
    on Sep 30, 2026
  2. jra3 commented on Oct 13, 2026

    @jra3
    OwnerAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:lowLow priority - nice to haveready-for-agentFully specified, ready for an AFK agenttestingTesting, test coverage, and quality assurance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0