스키마 작업완료

This commit is contained in:
koreacomp5
2025-10-09 11:23:27 +09:00
parent feea2efd7d
commit 296df7b582
10 changed files with 1150 additions and 111 deletions

View File

@@ -0,0 +1,21 @@
import { NextResponse } from "next/server";
import prisma from "@/lib/prisma";
export async function GET() {
const boards = await prisma.board.findMany({
orderBy: [{ sortOrder: "asc" }, { createdAt: "asc" }],
select: {
id: true,
name: true,
slug: true,
description: true,
type: true,
requiresApproval: true,
allowAnonymousPost: true,
isAdultOnly: true,
},
});
return NextResponse.json({ boards });
}