9 lines
227 B
TypeScript
9 lines
227 B
TypeScript
|
import type { LayoutServerLoad } from "./$types"
|
||
|
import { redirect } from "@sveltejs/kit";
|
||
|
|
||
|
export const load: LayoutServerLoad = async ({ locals }) => {
|
||
|
if (!await locals.getSession()) {
|
||
|
throw redirect(302, "/login");
|
||
|
}
|
||
|
}
|