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>
17 lines
386 B
TypeScript
17 lines
386 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { cookies } from "next/headers";
|
|
import {
|
|
ADMIN_COOKIE,
|
|
isAdminConfigured,
|
|
verifyAdminSession,
|
|
} from "~/lib/admin-auth";
|
|
|
|
export async function GET() {
|
|
const jar = await cookies();
|
|
const ok = verifyAdminSession(jar.get(ADMIN_COOKIE)?.value);
|
|
return NextResponse.json({
|
|
ok,
|
|
configured: isAdminConfigured(),
|
|
});
|
|
}
|