import { Router } from "express"; import { requireAuth } from "../auth/middleware.js"; import { buildTopology } from "../services/topology.js"; import { asyncHandler } from "../utils/asyncHandler.js"; export const mapRouter = Router(); mapRouter.use(requireAuth); // How servers, Proxmox hosts, DNS names and monitors connect. Everyone signed in can see it: it is the same information the pages // it links to already show. mapRouter.get("/", asyncHandler(async (_req, res) => { res.json(await buildTopology()); }));