hopefully fix login loop
All checks were successful
Code quality checks / build (23) (push) Successful in 34s
Push code / build (push) Successful in 53s

This commit is contained in:
Lara 2024-11-03 11:32:55 +02:00
parent cf28aed45a
commit c1eff928be
Signed by: laratheprotogen
GPG key ID: 5C0296EB3165F98B
2 changed files with 3 additions and 3 deletions

View file

@ -5,6 +5,6 @@ export const load: PageServerLoad = ({ cookies }) => {
const apiKey = String(cookies.get('apiKey') ?? '');
if (!apiKey) {
return redirect(301, `${process.env.API_URL}/auth/new-login`);
return redirect(307, `${process.env.API_URL}/auth/new-login`);
}
};

View file

@ -12,8 +12,8 @@ export const GET: RequestHandler = async ({ url, cookies }) => {
secure: true,
sameSite: 'strict'
});
return redirect(301, '/new/dashboard');
return redirect(302, '/new/dashboard');
} else {
return redirect(301, `/new/?error=${error}`);
return redirect(302, `/new/?error=${error}`);
}
};