fix: 오류 수정
This commit is contained in:
@@ -162,12 +162,27 @@ export function createHttpPublicContentGateway(
|
||||
kind: "CASE",
|
||||
problem: (body.problemSummary as string) ?? "",
|
||||
conclusion: (body.conclusionSummary as string) ?? "",
|
||||
environment: ((body.environmentSummary as readonly string[]) ?? []).join(", "),
|
||||
// The Case document renders a verification line. The contract has no
|
||||
// field for it — verification lives in the body — so it stays empty
|
||||
// rather than being guessed from a heading.
|
||||
verification: "",
|
||||
// `environmentSummary` 는 검증 환경과 재현 조건을 그 순서로 담는다 — 서버가 비어 있지
|
||||
// 않은 것만 순서대로 넣는다. 예전에는 둘을 쉼표로 이어 붙여 한 칸에 넣고 재현 조건 칸은
|
||||
// "계약에 없다"며 비워 두었는데, 계약에는 있었고 채우는 쪽이 없었을 뿐이다.
|
||||
environment: ((body.environmentSummary as readonly string[]) ?? [])[0] ?? "",
|
||||
verification: ((body.environmentSummary as readonly string[]) ?? [])[1] ?? "",
|
||||
lastVerifiedLabel: dateLabel(body.lastVerifiedAt as string),
|
||||
content: (body.content as string) ?? "",
|
||||
bodyAssets: Object.freeze(
|
||||
((body.bodyAssets as readonly Readonly<Record<string, unknown>>[]) ?? []).map((asset) =>
|
||||
Object.freeze({
|
||||
assetKey: asset.assetKey as string,
|
||||
assetId: asset.assetId as string,
|
||||
url: asset.url as string,
|
||||
contentType: asset.contentType as string,
|
||||
altText: (asset.altText as string) ?? "",
|
||||
width: (asset.width as number) ?? null,
|
||||
height: (asset.height as number) ?? null,
|
||||
decorative: Boolean(asset.decorative),
|
||||
}),
|
||||
),
|
||||
),
|
||||
sections: markdownSections(body.content as string),
|
||||
}) as unknown as Extract<PublicRecord, { kind: K }>;
|
||||
}
|
||||
|
||||
@@ -194,6 +194,9 @@ export function knowledgeListItemToRecord(item: Readonly<Record<string, unknown>
|
||||
environment: "",
|
||||
verification: "",
|
||||
lastVerifiedLabel: dateLabel(item.lastVerifiedAt as string),
|
||||
// 목록 항목은 본문을 담지 않는다 — 본문은 상세 조회에서만 온다.
|
||||
content: "",
|
||||
bodyAssets: Object.freeze([]),
|
||||
sections: Object.freeze([]),
|
||||
}) as CaseRecord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user