refactor private property in health module

This commit is contained in:
sbriat 2023-06-29 10:24:42 +02:00
parent d9fc46513d
commit 9728ed69ab
1 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ import { MessagePublisherPort } from '@libs/ports/message-publisher.port';
@Injectable()
export class RepositoriesHealthIndicatorUseCase extends HealthIndicator {
private checkRepositories: CheckRepositoryPort[];
private _checkRepositories: CheckRepositoryPort[];
constructor(
@Inject(AD_REPOSITORY)
private readonly adRepository: AdRepositoryPort,
@ -22,12 +22,12 @@ export class RepositoriesHealthIndicatorUseCase extends HealthIndicator {
private readonly messagePublisher: MessagePublisherPort,
) {
super();
this.checkRepositories = [adRepository];
this._checkRepositories = [adRepository];
}
isHealthy = async (key: string): Promise<HealthIndicatorResult> => {
try {
await Promise.all(
this.checkRepositories.map(
this._checkRepositories.map(
async (checkRepository: CheckRepositoryPort) => {
await checkRepository.healthCheck();
},