feat(compactRecipe) Add owner filter (ALL / MINE) to recipe list endpoint #7

Merged
araemer merged 1 commit from recipe-owner-filter into stage 2026-08-22 06:04:17 +00:00
Owner

Summary

  • Adds RecipeOwnerFilter enum (ALL | MINE) to CompactRecipeFilterRequest
  • When MINE is sent, the service resolves the creator ID from the JWT — the client never sends a UUID
  • CompactRecipeFilter gains an optional creatorId field; the repository applies it as an andWhere on recipe.createdBy
  • No migration required — createdBy is already a column on every recipe row via AbstractEntity
  • Enum is designed for extension: adding FAVORITES later only requires a new enum value and a new service branch

Test plan

  • CompactRecipeApplicationService tests: MINE sets creatorId to current user, ALL and absent leave it undefined
  • Full test suite passes (339 tests)
  • TypeScript build compiles clean
  • Bruno: send recipeOwner: "MINE" and verify only own recipes are returned; send ALL or omit and verify all recipes are returned
## Summary - Adds `RecipeOwnerFilter` enum (`ALL` | `MINE`) to `CompactRecipeFilterRequest` - When `MINE` is sent, the service resolves the creator ID from the JWT — the client never sends a UUID - `CompactRecipeFilter` gains an optional `creatorId` field; the repository applies it as an `andWhere` on `recipe.createdBy` - No migration required — `createdBy` is already a column on every recipe row via `AbstractEntity` - Enum is designed for extension: adding `FAVORITES` later only requires a new enum value and a new service branch ## Test plan - [ ] `CompactRecipeApplicationService` tests: `MINE` sets `creatorId` to current user, `ALL` and absent leave it `undefined` - [ ] Full test suite passes (339 tests) - [ ] TypeScript build compiles clean - [ ] Bruno: send `recipeOwner: "MINE"` and verify only own recipes are returned; send `ALL` or omit and verify all recipes are returned
feat(compactRecipe) Add owner filter (ALL / MINE) to recipe list endpoint
All checks were successful
/ test (pull_request) Successful in 29s
5fcedce266
Frontend passes RecipeOwnerFilter.MINE to get only their own recipes; the
user ID is resolved server-side from the JWT so the client never sends a UUID.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
araemer merged commit 459c5d2d48 into stage 2026-08-22 06:04:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
araemer/recipe-backend!7
No description provided.