Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
11 lines
334 B
TypeScript
11 lines
334 B
TypeScript
import { redirect, type ServerLoadEvent } from '@sveltejs/kit';
|
|
import type { PageServerLoad } from '../anmeldung/$types';
|
|
|
|
export const load: PageServerLoad = (event: ServerLoadEvent) => {
|
|
if (!event.locals.user && event.url.pathname !== '/anmeldung') throw redirect(303, '/anmeldung');
|
|
return {
|
|
user: event.locals.user
|
|
|
|
};
|
|
}
|