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,