import type { RequestHandler } from './$types';
import { redirect } from '@sveltejs/kit';
import { destroySession } from '$lib/server/auth';

export const POST: RequestHandler = ({ cookies }) => {
  destroySession(cookies);
  throw redirect(303, '/admin/login');
};
