import { NextResponse } from "next/server"; import { withAuth } from "@/lib/api-auth"; import { listBenchmarkLogs } from "@/lib/benchmarks"; export const dynamic = "force-dynamic"; /** Log lines after `?after=` (first call: the last 500). */ export const GET = withAuth>(async (req, { params }) => { const after = Number(new URL(req.url).searchParams.get("after") ?? 0) || 0; return NextResponse.json(await listBenchmarkLogs((await params).id, after)); });