From 7de997f37e08f2c3c59c781de563d4b5d1945b05 Mon Sep 17 00:00:00 2001 From: Sem Bauke Date: Mon, 20 Apr 2026 18:32:26 +0200 Subject: [PATCH] fix(client): use session-user endpoint on client (#66961) --- client/src/utils/ajax.ts | 2 +- e2e/flash.spec.ts | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/src/utils/ajax.ts b/client/src/utils/ajax.ts index 088edd5a104..a02ab0b39f4 100644 --- a/client/src/utils/ajax.ts +++ b/client/src/utils/ajax.ts @@ -153,7 +153,7 @@ export function getSessionUser( signal?: AbortSignal ): Promise> { const responseWithData: Promise> = get( - '/user/get-session-user', + '/user/session-user', signal ); // TODO: Once DB is migrated, no longer need to parse `files` -> `challengeFiles` etc. diff --git a/e2e/flash.spec.ts b/e2e/flash.spec.ts index ffb5046a97a..c6426ef09f5 100644 --- a/e2e/flash.spec.ts +++ b/e2e/flash.spec.ts @@ -42,10 +42,13 @@ test.describe('Flash Message component E2E test', () => { }); test('should be visible when a network error occurs', async ({ page }) => { - await page.route( - '*/**/user/get-session-user', - async route => await route.fulfill({ status: 500 }) - ); + await page.route('*/**/user/session-user', async route => { + await route.fulfill({ + status: 500, + contentType: 'application/json', + body: JSON.stringify({ user: {}, result: '' }) + }); + }); await page.goto('/'); await checkFlashMessageVisibility(