From dbd79f47975f2105ca4f9687b8fcdbd6bd2ee3ab Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Sat, 19 Mar 2022 10:42:32 -0500 Subject: [PATCH] Fixed MAPBOX_KEY validation error --- server/src/config/app.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/config/app.config.ts b/server/src/config/app.config.ts index 8114e6e0dc..d58c102b3d 100644 --- a/server/src/config/app.config.ts +++ b/server/src/config/app.config.ts @@ -13,9 +13,9 @@ export const immichAppConfig: ConfigModuleOptions = { JWT_SECRET: Joi.string().required(), ENABLE_MAPBOX: Joi.boolean().required().valid(true, false), MAPBOX_KEY: Joi.any().when('ENABLE_MAPBOX', { - is: true, - then: Joi.string().required(), - otherwise: Joi.string().optional(), + is: false, + then: Joi.string().optional().allow(null, ''), + otherwise: Joi.string().required(), }), }), };