schulart und Noten in fronend. Erste versuch Zeitraum in backend
This commit is contained in:
8
src/routes/admin/zeitraum/+page.server.ts
Normal file
8
src/routes/admin/zeitraum/+page.server.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
|
||||
export const load: PageServerLoad = async ({ cookies }) => {
|
||||
if (cookies.get('admin_session') !== 'true') {
|
||||
throw redirect(303, '/admin'); // zurück zur Login-Seite
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user