1// What `/` shows, as JSON, for the page to poll while today's field is2// being produced (live | generating | missing).3import { define } from "../utils.ts";4import { daily } from "../lib/daily.ts";5import { latestGameId } from "../lib/games.ts";67export const handler = define.handlers({8 GET() {9 const d = daily();10 if (!d) {11 return Response.json({12 date: null,13 phase: latestGameId() ? "live" : "missing",14 live: latestGameId(),15 since_s: null,16 emergency: false,17 latest_archived: null,18 tomorrow: { date: "", pushed: false },19 reset: 0,20 }, { headers: { "Cache-Control": "no-store" } });21 }22 return Response.json(d.status(), {23 headers: { "Cache-Control": "no-store" },24 });25 },26});