import { createAudit, getAuditById, getAudits } from "../controllers/audit.controller.mjs";
import { Router } from "express";

//#region src/routes/audit.routes.ts
const auditRouter = Router();
const auditRoute = "/api/audit";
const baseURL = () => `${process.env.BACKEND_URL}${auditRoute}`;
const getAuditRoutes = () => ({
	createAudit: {
		urlModel: "/",
		url: baseURL(),
		method: "POST"
	},
	getAudits: {
		urlModel: "/",
		url: baseURL(),
		method: "GET"
	},
	getAuditById: {
		urlModel: "/:auditId",
		url: ({ auditId }) => `${baseURL()}/${auditId}`,
		method: "GET"
	}
});
auditRouter.post(getAuditRoutes().createAudit.urlModel, createAudit);
auditRouter.get(getAuditRoutes().getAudits.urlModel, getAudits);
auditRouter.get(getAuditRoutes().getAuditById.urlModel, getAuditById);

//#endregion
export { auditRoute, auditRouter, getAuditRoutes };
//# sourceMappingURL=audit.routes.mjs.map