fix(pitch-deck): include fm_scenarios in preview-data API response

The admin preview was not returning fm_scenarios/fm_assumptions,
so preferredScenarioId was always null and all financial slides
fell back to Base Case (1M) instead of the version's scenario.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-17 08:35:22 +02:00
parent 030991cb9a
commit bad4659d5b

View File

@@ -49,6 +49,8 @@ export async function GET(request: NextRequest, ctx: Ctx) {
metrics: map.metrics || [],
funding: (map.funding || [])[0] || null,
products: map.products || [],
fm_scenarios: map.fm_scenarios || [],
fm_assumptions: map.fm_assumptions || [],
_version: { name: ver.rows[0].name, status: ver.rows[0].status },
})
}