import { NextResponse } from 'next/server'; import { getClients } from '@/lib/clients'; export async function GET(_req: Request, { params }: { params: Promise<{ id: string }> }) { const { id } = await params; const accountId = Number(id); const clients = getClients(); for (const client of clients.values()) { const daily = client.dailyPnL?.[accountId]; if (daily !== undefined) { return NextResponse.json(daily); } } return NextResponse.json([]); }