scaler updates
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
import type { Express } from "express";
|
||||
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
|
||||
app.use(`${baseUrl}/api/system/prodSql`, start);
|
||||
app.use(`${baseUrl}/api/system/prodSql`, stop);
|
||||
app.use(`${baseUrl}/api/system/prodSql`, restart);
|
||||
// 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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user