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
if (config.redis) {
const redisConfig = config.redis as any;
if (redisConfig["host"] || redisConfig["port"]) {
if (redisConfig.host || redisConfig.port) {
config.redis.socket = {
host: redisConfig["host"],
port: redisConfig["port"]
host: redisConfig.host,
port: redisConfig.port
};
}
if (redisConfig["enable_offline_queue"] !== undefined) {
config.disableOfflineQueue = !redisConfig["enable_offline_queue"];
if (redisConfig.enable_offline_queue !== undefined) {
config.disableOfflineQueue = !redisConfig.enable_offline_queue;
}
}
}