This commit is contained in:
koreacomp5
2025-11-02 04:39:28 +09:00
parent d057ebef4a
commit 4d310346c1
15 changed files with 28 additions and 28 deletions

View File

@@ -18,7 +18,6 @@ export async function POST(req: Request) {
}
const { boardId, authorId, title, content, isAnonymous } = parsed.data;
const board = await prisma.board.findUnique({ where: { id: boardId } });
const requiresApproval = board?.requiresApproval ?? false;
// 사진형 보드 필수 이미지 검증: content 내 이미지 링크 최소 1개
const isImageOnly = (board?.requiredFields as any)?.imageOnly;
const minImages = (board?.requiredFields as any)?.minImages ?? 0;
@@ -35,7 +34,7 @@ export async function POST(req: Request) {
title,
content,
isAnonymous: !!isAnonymous,
status: requiresApproval ? "hidden" : "published",
status: "published",
},
});
return NextResponse.json({ post }, { status: 201 });