From 671b67756993b6890c51b9fa5cc3295e9519f1b6 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Fri, 2 Aug 2024 19:22:44 -0300 Subject: [PATCH] fix: fetchInstances with clientName parameter --- CHANGELOG.md | 2 ++ src/api/services/monitor.service.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9349b4d0..1736bfa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Fixed +* fetchInstances with clientName parameter + # 2.0.5-rc (2024-08-01 18:01) ### Features diff --git a/src/api/services/monitor.service.ts b/src/api/services/monitor.service.ts index 44bb77ed..5fbf1726 100644 --- a/src/api/services/monitor.service.ts +++ b/src/api/services/monitor.service.ts @@ -68,7 +68,9 @@ export class WAMonitoringService { throw new NotFoundException(`Instance "${instanceName}" not found`); } - const where = instanceName ? { name: instanceName } : {}; + const clientName = await this.configService.get('DATABASE').CONNECTION.CLIENT_NAME; + + const where = instanceName ? { name: instanceName, clientName } : { clientName }; const instances = await this.prismaRepository.instance.findMany({ where,