| 1 | import { NextResponse } from "next/server"; |
| 2 | import { getStates } from "@/lib/feed"; |
| 3 | |
| 4 | export const revalidate = 300; |
| 5 | |
| 6 | |
| 7 | export async function GET() { |
| 8 | const items = getStates(); |
| 9 | if (!items.length) { |
| 10 | return NextResponse.json({ |
| 11 | items: [], |
| 12 | total: 0, |
| 13 | note: "State coverage polling is not yet active. When it is, each state reports its own coverage level here - gaps are recorded, not hidden.", |
| 14 | }); |
| 15 | } |
| 16 | return NextResponse.json({ items, total: items.length }); |
| 17 | } |