import { NextRequest, NextResponse } from "next/server";
import { isOpsAuthed } from "@/lib/ops-auth";

export async function GET(req: NextRequest) {
  if (!isOpsAuthed(req)) {
    return NextResponse.json({ authenticated: false }, { status: 401 });
  }
  return NextResponse.json({
    authenticated: true,
    email: process.env.OT_ADMIN_EMAIL || "admin@ot.azulado.cloud",
    role: "admin",
  });
}
