import { competitorReport } from '@/lib/runtime.js';
import { requireSession } from '@/lib/auth.js';
export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';
export async function POST(req) {
  try {
    await requireSession(req);
    return Response.json(competitorReport());
  } catch (err) {
    if (err && typeof err === 'object' && err.status) {
      return Response.json({ error: err.error || 'unauthorized' }, { status: err.status });
    }
    throw err;
  }
}
