10.2 게시판 스키마/설정 관리 UI

This commit is contained in:
koreacomp5
2025-10-09 18:18:13 +09:00
parent 0f375bdd67
commit fee16e68f2
3 changed files with 48 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
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 });
}