The portal store merged events from the API with localStorage events without ever pruning stale entries. When /auth/me returned empty portal_events (e.g. after a person's user_id was cleared), localStorage events persisted, causing "registratie niet ophalen" when /portal/me correctly returned 404. Now when /auth/me succeeds, API data is the source of truth — stored events not confirmed by the API are dropped. localStorage fallback is only used when the API call fails (network error). Also adds an end-to-end test covering the full register → approve → portal/me flow including festival hierarchy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 KiB
10 KiB