import { Router } from "express";
import { apiReturn } from "../utils/returnHelper.utils.js";
import { closePool } from "./prodSqlConnection.controller.js";

const r = Router();

r.post("/", async (_, res) => {
	const connect = await closePool();
	apiReturn(res, {
		success: connect.success,
		level: connect.success ? "info" : "error",
		module: "routes",
		subModule: "prodSql",
		message: connect.message,
		data: connect.data,
		status: connect.success ? 200 : 400,
	});
});

export default r;
