import { redirect } from '@sveltejs/kit';

/** @type {import('./$types').PageServerLoad} */
export function load(event) {
	if (!event.locals.user && event.url.pathname !== '/anmeldung') throw redirect(303, '/anmeldung');
	return {
		user: event.locals.user
	};
}
