import { pingHeartbeat } from "@peppa/core"; export const dynamic = "force-dynamic"; /** PEP-202: a heartbeat monitor's ping — the watched service calls it (GET or POST, no login). */ async function ping(_req: Request, { params }: { params: Promise<{ token: string }> }) { const { token } = await params; const ok = pingHeartbeat(token); return Response.json({ ok }, { status: ok ? 200 : 404, headers: { "Cache-Control": "no-store" } }); } export const GET = ping; export const POST = ping;