@vida-global/core 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/server/server.js
CHANGED
|
@@ -116,8 +116,9 @@ class VidaServer {
|
|
|
116
116
|
|
|
117
117
|
get middlewareLogger() {
|
|
118
118
|
return pino({
|
|
119
|
+
level: process.env.HTTP_LOG_LEVEL || 'info',
|
|
119
120
|
transport: {
|
|
120
|
-
level: process.env.
|
|
121
|
+
level: process.env.HTTP_LOG_LEVEL || 'info',
|
|
121
122
|
target: 'pino-pretty',
|
|
122
123
|
options: {
|
|
123
124
|
colorize: true,
|
|
@@ -250,7 +250,9 @@ class VidaServerController {
|
|
|
250
250
|
|
|
251
251
|
|
|
252
252
|
validateIsEnum(value, options) {
|
|
253
|
-
if (!options.enums.includes(value))
|
|
253
|
+
if (!options.enums.includes(value)) {
|
|
254
|
+
return options.error || `must be one of [${options.enums.filter(Boolean).join(', ')}]`;
|
|
255
|
+
}
|
|
254
256
|
}
|
|
255
257
|
|
|
256
258
|
|