vinindkoeb/app/routers
carsten ded23efc6a Add admin CRUD for participants (incl. active/inactive)
Full CRUD on Participant scoped to the caller's organization via new
get_route_in_organization/get_participant_in_organization helpers in
app/dependencies.py (shared cross-cutting spot, reused by task 6).
PATCH is_active is the primary deactivation path — replaces the old
spreadsheet-era "empty order" trick and preserves order history for
participants who leave and later return. DELETE is a separate,
superadmin-gated hard-delete for GDPR erasure requests, which cascades
to the participant's orders.

Adds UNIQUE(route_id, email) at the DB level (existing 308 participants
already conform, per task 3's dedup) plus email normalization on
create/update, so case-variant duplicates can't reappear via the API.
Every write path relies on catching the constraint's IntegrityError for
a clean 409 rather than a racy pre-check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 13:05:08 +02:00
..
__init__.py Add simple JWT login for User 2026-09-27 22:23:25 +02:00
auth.py Add simple JWT login for User 2026-09-27 22:23:25 +02:00
participants.py Add admin CRUD for participants (incl. active/inactive) 2026-09-28 13:05:08 +02:00