import { NextResponse } from 'next/server';

import { PORTAL_COOKIE } from '@/lib/portal/auth';
import { env } from '@/lib/env';

export async function POST(): Promise<NextResponse> {
  const response = NextResponse.redirect(new URL('/portal/login', env.APP_URL));

  response.cookies.delete(PORTAL_COOKIE);

  return response;
}
