ops(api): lägg till /ops/v1/health för EOC

This commit is contained in:
Sven (AAMOS AI)
2026-08-11 07:37:51 +07:00
parent 714d0a2e5b
commit 63d83e0d7c
2 changed files with 35 additions and 0 deletions
+5
View File
@@ -35,6 +35,11 @@ function requireOpsToken(app: FastifyInstance) {
export async function opsRoutes(app: FastifyInstance) {
const preHandler = [requireOpsToken(app)];
app.get("/ops/v1/health", { preHandler }, async () => ({
ok: true,
app: "cibello",
}));
app.get("/ops/v1/summary", { preHandler }, async (_req, reply) => {
const [json, ts] = await app.redis.mget(CACHE_KEY, CACHE_TS_KEY);
if (!json) {