import type { APIRoute } from 'astro';
import { clearSession } from '../../lib/auth';

export const POST: APIRoute = ({ cookies }) => {
  clearSession(cookies);
  return new Response(null, {
    status: 302,
    headers: { Location: '/login' },
  });
};
