Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
587 B
TypeScript
26 lines
587 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
/** Public health anchor for Uptime-Kuma / Caddy / cron. */
|
|
export async function GET() {
|
|
return NextResponse.json(
|
|
{
|
|
ok: true,
|
|
service: "nomadro-portal",
|
|
ts: new Date().toISOString(),
|
|
anchors: {
|
|
config: "/api/config",
|
|
admin: "/admin",
|
|
bookRead: "/book/read#00-preface",
|
|
vipEbookRead: "/vip/ebook/read#00-preface",
|
|
ops: "/admin/ops",
|
|
analytics: "/admin/analytics",
|
|
},
|
|
},
|
|
{
|
|
headers: {
|
|
"Cache-Control": "no-store",
|
|
},
|
|
},
|
|
);
|
|
}
|