Files
la-voix-du-peuple/artifacts/voix-du-peuple
billisdead 18bb0efc30 Fix consent token not set before submission
- home.tsx: extract postConsent() helper; make onSubmit async and await it
  before doActualSubmit (returning users); await it in handleConsentConfirm
  before doActualSubmit (new users, was fire-and-forget)
- consultation.tsx: same fix on returning-user path in onSubmit

Without this, returning users (consent_v1 in localStorage) never called
/api/consent so the _ct cookie was never set, causing all submissions to
return 403 consent_required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 16:15:43 +02:00
..