Goal
Allow users to view and update their communication preferences per category via API.
Spec reference
docs/specs/recipe-creation-target-architecture.md — §"Authenticated recipe endpoints"
Implementation notes
GET /api/user/communication-preference — returns full list of all known categories with current isOptedIn value (defaults to false for categories with no row)
PUT /api/user/communication-preference — batch upsert preferences; body: CommunicationPreferenceItem[] { category, isOptedIn }
- DTO:
CommunicationPreferenceItem { category: string, isOptedIn: bool }
Acceptance criteria
Testing
- Integration tests: get with no rows (all default false), update a category, re-get reflects update
Part of#1108
Goal
Allow users to view and update their communication preferences per category via API.
Spec reference
docs/specs/recipe-creation-target-architecture.md— §"Authenticated recipe endpoints"Implementation notes
GET /api/user/communication-preference— returns full list of all known categories with currentisOptedInvalue (defaults tofalsefor categories with no row)PUT /api/user/communication-preference— batch upsert preferences; body:CommunicationPreferenceItem[] { category, isOptedIn }CommunicationPreferenceItem { category: string, isOptedIn: bool }Acceptance criteria
Testing
Part of#1108