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');
  }
};