fix: Tech-File html_content → content Mapping

API liefert html_content, Frontend erwartet content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-08 06:46:51 +02:00
parent c27022d11b
commit c6229a2c22
@@ -140,7 +140,12 @@ export default function TechFilePage() {
const res = await fetch(`/api/sdk/v1/iace/projects/${projectId}/tech-file`)
if (res.ok) {
const json = await res.json()
setSections(json.sections || json || [])
const raw = json.sections || json || []
// Map html_content → content for frontend compatibility
setSections(raw.map((s: Record<string, unknown>) => ({
...s,
content: s.content || s.html_content || null,
})))
}
} catch (err) {
console.error('Failed to fetch tech file sections:', err)