Actualiser modules/utils.js

This commit is contained in:
Gilles Lazures 2025-12-31 15:55:09 +01:00
parent 3a6f5b76fb
commit c531f2c82c

View File

@ -25,6 +25,11 @@ function sendValidationError(req, res, zodResult, type, path, errorConfig) {
return res.status(errorConfig.status || 400).json(response)
}
function isTrueFromDotEnv(key) {
return (process.env[key] || "").trim().toLowerCase() === "true"
}
module.exports = {
sendValidationError
sendValidationError,
isTrueFromDotEnv
}