Skip to content

Stage 6: API triggers — Emails on create/patch #177

Description

@bakhterets

Integrate notification enqueuing into the API layer to send emails on maintenance create/patch operations.

Files: internal/api/v2/v2.go, internal/api/api.go, internal/api/routes.go

Tasks:

  • Wrap each maintenance write + enqueue in one transaction.
  • Generate a fresh change_id per successful change.
  • Enqueue only for maintenance, only on success, only when enabled.
  • Map kind by resulting status: pending_review, reviewed, status_changed.
  • Verify: no outbox row on 400/403/409/500; integration test for recipients.

Deliverable: API endpoints trigger notifications on successful maintenance changes.

Depends on: Stage 4: Notification core, Stage 5: Transaction-safe writes

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions