Skip to content

Add communication preference endpoints #1155

Open

Description

@dgee2

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

  • GET returns all known categories (even those with no row, defaulting to opted-out)
  • PUT upserts each item in a single transaction

Testing

  • Integration tests: get with no rows (all default false), update a category, re-get reflects update

Part of#1108

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

    .NETPull requests that update .net codeenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions