mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
Two CI-only failures surfaced against a fresh backend DB: - The revoke test read after.data.find(), but the list endpoint omits data entirely when the admin has zero tokens, throwing on undefined. Default to []. - The password-change test's restore POST hit a 403: changing the password triggers a refresh-token that re-mints the nz-csrf cookie, so the X-CSRF-Token read just before the request can be stale. A failed restore left the admin on the rotated password and cascaded into cron/fm/visibility login failures. Add csrfRequest(), which retries once on 403 after re-reading the cookie, and use it for both profile mutations. Verified 8/8 passing across repeated fresh-DB CI-mode runs. Co-authored-by: cloudcode <cloudcode@users.noreply.github.com>