protect admin pages after refactoring

This commit is contained in:
2025-10-30 10:35:45 +01:00
parent c857041e21
commit 48fe999b5b
3 changed files with 22 additions and 2 deletions

View File

@@ -1,7 +1,12 @@
import { getVorgaenge } from '$lib/server/vorgangService';
import type { PageServerLoad } from '../../(token-based)/view/$types';
import { error } from '@sveltejs/kit';
export const load: PageServerLoad = async (event) => {
if (!event.locals.user) {
error(404, 'Not Found')
}
export const load: PageServerLoad = async () => {
const vorgangList = getVorgaenge();
return {