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); }