fix(preview): return fp_scenarios key so version-specific scenario is resolved in admin preview
Build pitch-deck / build-push-deploy (push) Successful in 1m39s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 40s
CI / test-python-voice (push) Successful in 32s
CI / test-bqas (push) Successful in 33s

The preview-data API was returning `fm_scenarios` but PitchDeck reads
`data.fp_scenarios`, so fpBaseScenarioId was always null and the
Finanzplan slide fell back to the global default scenario (Base Case 200k)
instead of the version's assigned scenario (e.g. 1 Mio. Euro Base).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-05-05 11:39:53 +02:00
parent 404963db77
commit f0a84e79ab
@@ -49,7 +49,7 @@ export async function GET(request: NextRequest, ctx: Ctx) {
metrics: map.metrics || [],
funding: (map.funding || [])[0] || null,
products: map.products || [],
fm_scenarios: map.fm_scenarios || [],
fp_scenarios: map.fm_scenarios || [],
fm_assumptions: map.fm_assumptions || [],
_version: { name: ver.rows[0].name, status: ver.rows[0].status },
})