import { railCounts } from "@/lib/rail"; export const dynamic = "force-dynamic"; // The rail's counts: { inbox, work } (lib/rail.ts). Memoised a few seconds. export async function GET() { try { return Response.json(await railCounts(), { headers: { "cache-control": "no-store" } }); } catch (err) { return Response.json({ error: (err as Error).message }, { status: 500, headers: { "cache-control": "no-store" } }); } }