fix(client): use session-user endpoint on client (#66961)

This commit is contained in:
Sem Bauke
2026-04-20 18:32:26 +02:00
committed by GitHub
parent 3ff3bdc89c
commit 7de997f37e
2 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ export function getSessionUser(
signal?: AbortSignal signal?: AbortSignal
): Promise<ResponseWithData<User | null>> { ): Promise<ResponseWithData<User | null>> {
const responseWithData: Promise<ResponseWithData<ApiUserResponse>> = get( const responseWithData: Promise<ResponseWithData<ApiUserResponse>> = get(
'/user/get-session-user', '/user/session-user',
signal signal
); );
// TODO: Once DB is migrated, no longer need to parse `files` -> `challengeFiles` etc. // TODO: Once DB is migrated, no longer need to parse `files` -> `challengeFiles` etc.
+7 -4
View File
@@ -42,10 +42,13 @@ test.describe('Flash Message component E2E test', () => {
}); });
test('should be visible when a network error occurs', async ({ page }) => { test('should be visible when a network error occurs', async ({ page }) => {
await page.route( await page.route('*/**/user/session-user', async route => {
'*/**/user/get-session-user', await route.fulfill({
async route => await route.fulfill({ status: 500 }) status: 500,
); contentType: 'application/json',
body: JSON.stringify({ user: {}, result: '' })
});
});
await page.goto('/'); await page.goto('/');
await checkFlashMessageVisibility( await checkFlashMessageVisibility(