feat(shoot): clear all frames of a shoot #58

Merged
eliott merged 1 commit from feat/clear-shoot-frames into develop 2026-07-13 15:36:16 +02:00
Owner

Adds DELETE /shoot/:id/frames to remove every frame of a shoot in one call.

What

  • New ShootService.clearFrames(userId, id): owner-scoped, shoot-locked (FOR UPDATE) transaction that bulk-deletes all frames of the shoot. No frame-number recompaction is needed since nothing remains.
  • Guards mirror the frame create/duplicate write rules: 404 if the shoot is missing, 403 if it belongs to another user, 400 if the shoot is completed (doneAt set).
  • New route @Delete(':id/frames') on the shoot controller.

Tests

  • 4 new integration tests in shoot.int-spec.ts: happy path (frames gone, shoot kept, frameCount 0), cross-user 403, completed-shoot 400, missing-shoot 404.

Versioning

  • Bumps api to 0.9.0 (new endpoint).
  • Adds a v0.8.0 changelog entry ('Clear all frames in one tap') seeded in seed.ts, matching the rollnote-front 0.8.0 bump in its companion PR.
Adds `DELETE /shoot/:id/frames` to remove every frame of a shoot in one call. ## What - New `ShootService.clearFrames(userId, id)`: owner-scoped, shoot-locked (`FOR UPDATE`) transaction that bulk-deletes all frames of the shoot. No frame-number recompaction is needed since nothing remains. - Guards mirror the frame create/duplicate write rules: 404 if the shoot is missing, 403 if it belongs to another user, 400 if the shoot is completed (`doneAt` set). - New route `@Delete(':id/frames')` on the shoot controller. ## Tests - 4 new integration tests in `shoot.int-spec.ts`: happy path (frames gone, shoot kept, frameCount 0), cross-user 403, completed-shoot 400, missing-shoot 404. ## Versioning - Bumps api to 0.9.0 (new endpoint). - Adds a `v0.8.0` changelog entry ('Clear all frames in one tap') seeded in `seed.ts`, matching the rollnote-front 0.8.0 bump in its companion PR.
Bulk-deletes every frame of a shoot in one owner-scoped, shoot-locked
transaction. Nothing survives to renumber, so it skips the gapless-1..N
recompaction the single-frame delete needs. Blocks non-owners (403) and
completed shoots (400), mirroring the frame create/duplicate write guards.

Adds a v0.8.0 changelog entry and bumps the API to 0.9.0.
eliott merged commit 53b37dc60b into develop 2026-07-13 15:36:16 +02:00
eliott deleted branch feat/clear-shoot-frames 2026-07-13 15:36:16 +02:00
Sign in to join this conversation.
No reviewers
No labels
run-ci
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollnote-api!58
No description provided.