adventure/src/routes/admin.ts
2026-11-05 12:39:53 -06:00

14 lines
456 B
TypeScript

import { Router } from "express";
import type { RuntimeConfig } from "../lib/runtime-config.js";
// Unauthenticated by design (LAN homelab). Runtime config holds no secrets
// by contract; see src/runtime-config.schema.ts.
export function adminRouter(deps: { runtimeConfig: RuntimeConfig }): Router {
const router = Router();
router.get("/admin/runtime-config", (_req, res) => {
res.json(deps.runtimeConfig.snapshot());
});
return router;
}