1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

Fixed MAPBOX_KEY validation error

This commit is contained in:
Alex Tran 2022-03-19 10:42:32 -05:00
parent f790315d3f
commit dbd79f4797

View file

@ -13,9 +13,9 @@ export const immichAppConfig: ConfigModuleOptions = {
JWT_SECRET: Joi.string().required(), JWT_SECRET: Joi.string().required(),
ENABLE_MAPBOX: Joi.boolean().required().valid(true, false), ENABLE_MAPBOX: Joi.boolean().required().valid(true, false),
MAPBOX_KEY: Joi.any().when('ENABLE_MAPBOX', { MAPBOX_KEY: Joi.any().when('ENABLE_MAPBOX', {
is: true, is: false,
then: Joi.string().required(), then: Joi.string().optional().allow(null, ''),
otherwise: Joi.string().optional(), otherwise: Joi.string().required(),
}), }),
}), }),
}; };