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:
@@ -49,6 +49,8 @@ export async function GET(request: NextRequest, ctx: Ctx) {
|
|||||||
metrics: map.metrics || [],
|
metrics: map.metrics || [],
|
||||||
funding: (map.funding || [])[0] || null,
|
funding: (map.funding || [])[0] || null,
|
||||||
products: map.products || [],
|
products: map.products || [],
|
||||||
|
fm_scenarios: map.fm_scenarios || [],
|
||||||
|
fm_assumptions: map.fm_assumptions || [],
|
||||||
_version: { name: ver.rows[0].name, status: ver.rows[0].status },
|
_version: { name: ver.rows[0].name, status: ver.rows[0].status },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user