Files
EpicNext-Cms/src/app/api/admin/devops/health/route.ts
T
SimoandCursor 58fae1f90f
CI / check (push) Successful in 29s
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m25s
CI / deploy (push) Failing after 10s
feat(admin): analytics redis cache, shared ops health, ticket queue clarity
Co-authored-by: Cursor <[email protected]>
2026-07-30 19:57:00 +02:00

17 lines
511 B
TypeScript

import { NextResponse } from "next/server";
import { fetchOpsHealth } from "@/lib/admin/ops-health";
import { withAdmin } from "@/lib/api-handler";
import { PERMS } from "@/lib/permissions";
export const GET = withAdmin({ permission: PERMS.DEVOPS_VIEW }, async () => {
const health = await fetchOpsHealth();
return NextResponse.json({
database: health.dbOk,
dbLatency: health.dbLatencyMs,
emulator: health.emulatorOk,
onlineUsers: health.onlineUsers,
timestamp: new Date().toISOString(),
});
});