18 lines
545 B
TypeScript
18 lines
545 B
TypeScript
import { type Express, Router } from "express";
|
|
import { requireAuth } from "../middleware/auth.middleware.js";
|
|
import restart from "./prodSqlRestart.route.js";
|
|
import start from "./prodSqlStart.route.js";
|
|
import stop from "./prodSqlStop.route.js";
|
|
export const setupProdSqlRoutes = (baseUrl: string, app: Express) => {
|
|
//setup all the routes
|
|
// Apply auth to entire router
|
|
const router = Router();
|
|
router.use(requireAuth);
|
|
|
|
router.use(start);
|
|
router.use(stop);
|
|
router.use(restart);
|
|
|
|
app.use(`${baseUrl}/api/system/prodSql`, router);
|
|
};
|