Files
lst/app/src/internal/system/routes.ts

20 lines
728 B
TypeScript

import type { Express, Request, Response } from "express";
import allServerStats from "./routes/allServerStats.js";
import modules from "./routes/modules/moduleRoutes.js";
import settings from "./routes/settings/settingRoutes.js";
import stats from "./routes/stats.js";
export const setupSystemRoutes = (app: Express, basePath: string) => {
app.use(basePath + "/api/system/stats", stats);
app.use(basePath + "/api/system/allservers/stats", allServerStats);
app.use(
basePath + "/api/system/settings", // will pass bc system admin but this is just telling us we need this
settings,
);
app.use(
basePath + "/api/system/modules", // will pass bc system admin but this is just telling us we need this
modules,
);
};