login check
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-02 22:36:28 +02:00
parent 6a83355db1
commit e44510110b
Signed by: laratheprotogen
GPG key ID: 5C0296EB3165F98B

View file

@ -0,0 +1,10 @@
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = ({ cookies }) => {
const apiKey = String(cookies.get('apiKey') ?? '');
if (!apiKey) {
return redirect(301, `${process.env.API_URL}/auth/new-login`);
}
};