// src/routes/admin/plaetze/+page.server.ts
import type { PageServerLoad } from './$types';
import { redirect } from '@sveltejs/kit';

export const load: PageServerLoad = async ({ cookies }) => {
  const adminAuth = cookies.get('admin-auth');
  
  if (adminAuth !== 'authenticated') {
    throw redirect(303, '/admin');
  }
  
  return {
    title: 'Plätze verwalten'
  };
};