Sprint 2 engine: TCO, investment, ramp-aware cash flow, scenarios, planner overrides, shelfware, KB curation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
10
src/app/api/portfolio/route.ts
Normal file
10
src/app/api/portfolio/route.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getAssessment, getCatalog, listAssessments } from "@/lib/store";
|
||||
import { buildPortfolio } from "@/lib/portfolio";
|
||||
import type { Assessment } from "@/lib/types";
|
||||
|
||||
export async function GET() {
|
||||
const [summaries, catalog] = await Promise.all([listAssessments(), getCatalog()]);
|
||||
const all = (await Promise.all(summaries.map((s) => getAssessment(s.id)))).filter(Boolean) as Assessment[];
|
||||
return NextResponse.json(buildPortfolio(all, catalog));
|
||||
}
|
||||
Reference in New Issue
Block a user