all repos — tabemono @ 89781888cc5ab8be01307ed9a52a2720c8f6a116

src/routes/(auth)/+layout.server.ts (view raw)

1import { redirect } from '@sveltejs/kit';
2import type { LayoutServerLoad } from './$types';
3
4export const load: LayoutServerLoad = async (event) => {
5	const session = await event.locals.getSession();
6	if (!session) return redirect(303, '/login');
7	return { session: session.info };
8};