diff --git a/modules/utils.js b/modules/utils.js index 9385702..193ee0d 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -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 } \ No newline at end of file