import { NextResponse } from "next/server";
import { getSession } from "@/lib/auth";
import { getUploadPolicy } from "@/lib/upload-policy";

/** The upload policy for the logged-in institution side (not sensitive). */
export async function GET() {
  const session = await getSession();
  if (!session) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
  return NextResponse.json(await getUploadPolicy());
}
