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);

	app.use(`${baseUrl}/api/system/prodSql/start`, requireAuth, start);
	app.use(`${baseUrl}/api/system/prodSql/stop`, requireAuth, stop);
	app.use(`${baseUrl}/api/system/prodSql/restart`, requireAuth, restart);
};
