diff --git a/CHANGELOG.md b/CHANGELOG.md index d55124d0d..53860cf81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 1.186.0 - 03.09.2022 +## 1.186.1 - 03.09.2022 ### Changed @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Made the environment variables `REDIS_HOST` and `REDIS_PORT` mandatory +- Fixed the environment variables `REDIS_HOST`, `REDIS_PASSWORD` and `REDIS_PORT` in the Redis configuration - Handled errors in the portfolio calculation if there is no internet connection - Fixed the _GitHub_ contributors count on the about page diff --git a/apps/api/src/app/redis-cache/redis-cache.module.ts b/apps/api/src/app/redis-cache/redis-cache.module.ts index c87ccaf69..299a25bab 100644 --- a/apps/api/src/app/redis-cache/redis-cache.module.ts +++ b/apps/api/src/app/redis-cache/redis-cache.module.ts @@ -12,7 +12,10 @@ import { RedisCacheService } from './redis-cache.service'; inject: [ConfigurationService], useFactory: async (configurationService: ConfigurationService) => { return { + host: configurationService.get('REDIS_HOST'), max: configurationService.get('MAX_ITEM_IN_CACHE'), + password: configurationService.get('REDIS_PASSWORD'), + port: configurationService.get('REDIS_PORT'), store: redisStore, ttl: configurationService.get('CACHE_TTL') }; diff --git a/apps/api/src/services/configuration.service.ts b/apps/api/src/services/configuration.service.ts index bdd3d112b..48133743e 100644 --- a/apps/api/src/services/configuration.service.ts +++ b/apps/api/src/services/configuration.service.ts @@ -39,9 +39,9 @@ export class ConfigurationService { MAX_ITEM_IN_CACHE: num({ default: 9999 }), PORT: port({ default: 3333 }), RAKUTEN_RAPID_API_KEY: str({ default: '' }), - REDIS_HOST: host(), + REDIS_HOST: host({ default: 'localhost' }), REDIS_PASSWORD: str({ default: '' }), - REDIS_PORT: port(), + REDIS_PORT: port({ default: 6379 }), ROOT_URL: str({ default: 'http://localhost:4200' }), STRIPE_PUBLIC_KEY: str({ default: '' }), STRIPE_SECRET_KEY: str({ default: '' }),