No ugly json access

This commit is contained in:
Ajay 2022-04-13 17:45:41 -04:00
parent 1df8117105
commit 929856fd3f

View file

@ -115,15 +115,15 @@ function migrate(config: SBSConfig) {
// Redis change // Redis change
if (config.redis) { if (config.redis) {
const redisConfig = config.redis as any; const redisConfig = config.redis as any;
if (redisConfig["host"] || redisConfig["port"]) { if (redisConfig.host || redisConfig.port) {
config.redis.socket = { config.redis.socket = {
host: redisConfig["host"], host: redisConfig.host,
port: redisConfig["port"] port: redisConfig.port
}; };
} }
if (redisConfig["enable_offline_queue"] !== undefined) { if (redisConfig.enable_offline_queue !== undefined) {
config.disableOfflineQueue = !redisConfig["enable_offline_queue"]; config.disableOfflineQueue = !redisConfig.enable_offline_queue;
} }
} }
} }