Skip to content

feat(api): guest ticket submission + lookup under /api/v1 (Phoenix)#90

Merged
mpge merged 1 commit into
masterfrom
feat/api-guest-tickets
Jun 25, 2026
Merged

feat(api): guest ticket submission + lookup under /api/v1 (Phoenix)#90
mpge merged 1 commit into
masterfrom
feat/api-guest-tickets

Conversation

@mpge

@mpge mpge commented Jun 25, 2026

Copy link
Copy Markdown
Member

Adds the anonymous-ticket part of the general API the Flutter app consumes:

  • POST /api/v1/guest/tickets — create with subject/description/guest name+email; mints a guest token; resolves a Contact via TicketService
  • GET /api/v1/guest/tickets/:token — fetch by token

Uses atom-keyed attrs (TicketService.create injects an atom :contact_id during guest contact resolution; Ecto rejects mixed-key maps — a latent bug the customer flow never hit).

Verified (Docker)

  • mix format ✓ · mix credo --strict ✓ · full suite 505 tests, 0 failures

Adds the anonymous-ticket part of the general API the Flutter app uses:

- POST /api/v1/guest/tickets — create with subject/description/guest
  name+email; mints a guest token; resolves a Contact via TicketService.
- GET  /api/v1/guest/tickets/:token — fetch by token.

Uses atom-keyed attrs because TicketService.create injects an atom
`:contact_id` during guest contact resolution and Ecto rejects mixed
string/atom key maps.

Verified in Docker: mix format, mix credo --strict, full suite
(505 tests, 0 failures).
@mpge
mpge merged commit 08a5855 into master Jun 25, 2026
1 check passed
@mpge
mpge deleted the feat/api-guest-tickets branch June 25, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant