import { getSession } from '@auth0/nextjs-auth0'; import { NextResponse } from 'next/server'; export async function requireAdmin(): Promise { const session = await getSession(); if (!session?.user) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); } return null; }