import { type Express, Router } from "express";
import { requireAuth } from "../middleware/auth.middleware.js";

import restart from "./gpSqlRestart.route.js";
import start from "./gpSqlStart.route.js";
import stop from "./gpSqlStop.route.js";
export const setupGPSqlRoutes = (baseUrl: string, app: Express) => {
	//setup all the routes
	// Apply auth to entire router
	const router = Router();

	router.use(start);
	router.use(stop);
	router.use(restart);

	app.use(`${baseUrl}/api/system/gpSql`, requireAuth, router);
};
