move API protection check into hooks, adjusting corresponding tests

This commit is contained in:
2025-11-04 09:22:53 +01:00
parent 3c16bc89e5
commit fd907c9851
10 changed files with 47 additions and 74 deletions

View File

@@ -2,9 +2,6 @@ import { getVorgaenge } from '$lib/server/vorgangService';
import { json } from '@sveltejs/kit';
export async function GET({ locals }) {
if (!locals.user) {
return json({ error: 'Unauthorized' }, { status: 401 });
}
const vorgaenge = getVorgaenge();
return new Response(JSON.stringify(vorgaenge), {