CI빌드 오류 수정
CI / test (push) Successful in 4m48s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Successful in 1m13s

This commit is contained in:
2025-12-07 10:12:38 +09:00
parent a5b432fb7b
commit 4902a0b5a9
5 changed files with 22 additions and 15 deletions
+7 -1
View File
@@ -112,11 +112,17 @@ export async function POST(request: Request) {
// 퍼블릭 슬러그 페이지(/p/[slug])가 DB 조회 없이도 최신 스냅샷을 바로 렌더링할 수 있도록
// 메모리 기반 캐시에 프로젝트 스냅샷을 저장해 둔다.
const rawContent = project.contentJson;
let contentBlocks: Block[] = [];
if (Array.isArray(rawContent)) {
contentBlocks = rawContent as unknown as Block[];
}
try {
cachePublicProject({
slug: project.slug,
title: project.title,
contentJson: (project.contentJson ?? []) as Block[],
contentJson: contentBlocks,
});
} catch {
// 캐시 저장 실패는 퍼블릭 렌더링에만 영향을 주므로, API 응답 자체는 정상적으로 계속 진행한다.