import { NextRequest, NextResponse } from 'next/server';

export async function GET(req: NextRequest) {
  const base =
    process.env.NEXT_PUBLIC_SITE_URL ??
    process.env.NEXT_PUBLIC_APP_URL ??
    req.headers.get('origin') ??
    `https://${req.headers.get('host')}`;
  return NextResponse.redirect(new URL('/restaurant-dashboard', base));
}
