From a2f428d700f7942afa7eae01b1d5bc1507cb1013 Mon Sep 17 00:00:00 2001 From: Artem Niehrieiev Date: Fri, 24 Apr 2026 12:20:47 +0000 Subject: [PATCH] refactor: simplify connection retrieval in GetHostedConnectionCredentialsUseCase --- .../use-cases/get-hosted-connection-credentials.use.case.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/microservices/saas-microservice/use-cases/get-hosted-connection-credentials.use.case.ts b/backend/src/microservices/saas-microservice/use-cases/get-hosted-connection-credentials.use.case.ts index 2afe3a77c..476a46da5 100644 --- a/backend/src/microservices/saas-microservice/use-cases/get-hosted-connection-credentials.use.case.ts +++ b/backend/src/microservices/saas-microservice/use-cases/get-hosted-connection-credentials.use.case.ts @@ -20,9 +20,7 @@ export class GetHostedConnectionCredentialsUseCase } protected async implementation(inputData: GetHostedConnectionCredentialsDto): Promise { - const connection = await this._dbContext.connectionRepository.findOne({ - where: { id: inputData.hostedDatabaseId }, - }); + const connection = await this._dbContext.connectionRepository.findOneConnection(inputData.hostedDatabaseId); if (!connection) { throw new NotFoundException(Messages.CONNECTION_NOT_FOUND); }