import { countPendingLocate } from '@/lib/db'; import { corsJson, corsPreflight } from '../cors'; /** Polled by the Chromium extension every few seconds, and by the AutoBuyer page. * The AutoBuyer has no on/off switch — it is ready whenever the runner is — so * the only thing worth reporting here is whether clicks are waiting to be served. */ export async function GET() { return corsJson({ pendingLocate: countPendingLocate() }); } export async function OPTIONS() { return corsPreflight(); }