Actualiser modules/utils.js
This commit is contained in:
parent
3a6f5b76fb
commit
c531f2c82c
@ -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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user