9 lines
294 B
TypeScript
9 lines
294 B
TypeScript
import { buildPortfolioSummary } from '@/lib/server/portfolio';
|
|
import { getStoreSnapshot } from '@/lib/server/store';
|
|
|
|
export async function GET() {
|
|
const snapshot = await getStoreSnapshot();
|
|
const summary = buildPortfolioSummary(snapshot.holdings);
|
|
return Response.json({ summary });
|
|
}
|