import { logger } from "../logger/index.mjs";

//#region src/middlewares/request.middleware.ts
const logAPIRequestURL = (req, res, next) => {
	const queryDetails = {
		params: req.params,
		query: req.query,
		body: req.body,
		locals: res.locals
	};
	logger.info(`API Request - ${req.method} - ${req.originalUrl} - ${JSON.stringify(queryDetails, null, 2)}`);
	next();
};

//#endregion
export { logAPIRequestURL };
//# sourceMappingURL=request.middleware.mjs.map