fix: fetchInstances with clientName parameter

This commit is contained in:
Davidson Gomes 2024-08-02 19:22:44 -03:00
parent 3fa6b1fcc5
commit 671b677569
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,8 @@
### Fixed ### Fixed
* fetchInstances with clientName parameter
# 2.0.5-rc (2024-08-01 18:01) # 2.0.5-rc (2024-08-01 18:01)
### Features ### Features

View File

@ -68,7 +68,9 @@ export class WAMonitoringService {
throw new NotFoundException(`Instance "${instanceName}" not found`); throw new NotFoundException(`Instance "${instanceName}" not found`);
} }
const where = instanceName ? { name: instanceName } : {}; const clientName = await this.configService.get<Database>('DATABASE').CONNECTION.CLIENT_NAME;
const where = instanceName ? { name: instanceName, clientName } : { clientName };
const instances = await this.prismaRepository.instance.findMany({ const instances = await this.prismaRepository.instance.findMany({
where, where,