From f0a84e79ab9d27d888d2f1602c5ce7a41cb634df Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Tue, 5 May 2026 11:39:53 +0200 Subject: [PATCH] fix(preview): return fp_scenarios key so version-specific scenario is resolved in admin preview 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 --- pitch-deck/app/api/preview-data/[versionId]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pitch-deck/app/api/preview-data/[versionId]/route.ts b/pitch-deck/app/api/preview-data/[versionId]/route.ts index 4d2d361..d71bdeb 100644 --- a/pitch-deck/app/api/preview-data/[versionId]/route.ts +++ b/pitch-deck/app/api/preview-data/[versionId]/route.ts @@ -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 }, })