import { NextResponse } from "next/server";
import prisma from "@/lib/prisma";

export async function GET() {
  const [users, posts, comments, reports, pendingReviews] = await Promise.all([
    prisma.user.count(),
    prisma.post.count(),
    prisma.comment.count(),
    prisma.report.count({ where: { status: "open" } }),
    prisma.post.count({ where: { status: "hidden" } }),
  ]);
  return NextResponse.json({ users, posts, comments, reportsOpen: reports, pendingReviews });
}


