From f89ed6cb76b6f0f2cf533360e61f397f036a4aa6 Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Fri, 29 Nov 2024 05:23:59 +0100 Subject: [PATCH] Add some debug logging --- .github/workflows/functional-tests.yml | 2 ++ frontend/src/routes/(app)/+page.server.ts | 2 ++ frontend/src/routes/(authentication)/login/+page.server.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index fda850435..f0762ff74 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -71,6 +71,8 @@ jobs: touch .env echo PUBLIC_BACKEND_API_URL=http://localhost:8000/api >> .env echo CI_TEST=1 >> .env + echo "WOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOW" + cat .env - name: Create backend environment variables file working-directory: ${{ env.backend-directory }} diff --git a/frontend/src/routes/(app)/+page.server.ts b/frontend/src/routes/(app)/+page.server.ts index f74b79b59..b180ce9b3 100644 --- a/frontend/src/routes/(app)/+page.server.ts +++ b/frontend/src/routes/(app)/+page.server.ts @@ -3,7 +3,9 @@ import type { PageServerLoad } from './$types'; import { CI_TEST } from '$lib/utils/constants'; const redirectURL = CI_TEST ? '/analytics' : '/analytics?refresh=1'; +console.log(`[NEW_REDIRECT:1] ${CI_TEST}`); export const load: PageServerLoad = async () => { + console.log(`[NEW_REDIRECT:2] ${CI_TEST}`); redirect(301, redirectURL); }; diff --git a/frontend/src/routes/(authentication)/login/+page.server.ts b/frontend/src/routes/(authentication)/login/+page.server.ts index 00606b48d..6df6a6dde 100644 --- a/frontend/src/routes/(authentication)/login/+page.server.ts +++ b/frontend/src/routes/(authentication)/login/+page.server.ts @@ -132,6 +132,7 @@ export const actions: Actions = { const next = url.searchParams.get('next') || '/'; const redirectURL = getSecureRedirect(next) + (CI_TEST ? '' : '?refresh=1'); + console.log(`[NEW_REDIRECT:3] ${redirectURL}`); redirect(302, redirectURL); }, mfaAuthenticate: async (event) => {