diff --git a/frontend/src/routes/auth/admin/users/+layout.server.js b/frontend/src/routes/auth/admin/users/+layout.server.js index b16803f..e8244ba 100644 --- a/frontend/src/routes/auth/admin/users/+layout.server.js +++ b/frontend/src/routes/auth/admin/users/+layout.server.js @@ -16,7 +16,7 @@ export async function load({ cookies, fetch, locals }) { if (!response.ok) { // Clear the invalid JWT cookie cookies.delete('jwt', { path: '/' }); - throw redirect(302, `${base}/auth/login?next=${base}admin/users/`); + throw redirect(302, `${base}/auth/login?next=${base}/auth/admin/users/`); } const data = await response.json(); @@ -44,6 +44,6 @@ export async function load({ cookies, fetch, locals }) { // In case of any error, clear the JWT cookie cookies.delete('jwt', { path: '/' }); - throw redirect(302, `${base}/auth/login?next=${base}/admin/users/`); + throw redirect(302, `${base}/auth/login?next=${base}/auth/admin/users/`); } } diff --git a/frontend/src/routes/auth/login/+page.server.js b/frontend/src/routes/auth/login/+page.server.js index 07db817..bded82a 100644 --- a/frontend/src/routes/auth/login/+page.server.js +++ b/frontend/src/routes/auth/login/+page.server.js @@ -71,7 +71,7 @@ export const actions = { } } - console.log('Redirecting to:', next || `${base}/`); - throw redirect(303, next || `${base}/`); + console.log('Redirecting to:', next || `${base}/auth/about/${responseBody.user.id}`); + throw redirect(303, next || `${base}/auth/about/${responseBody.user.id}`); } };