fix: find intance by number

This commit is contained in:
Davidson Gomes
2024-02-18 08:11:24 -03:00
parent a931ee7afb
commit 7e65cb1d19
4 changed files with 44 additions and 88 deletions

View File

@@ -642,13 +642,13 @@ export class InstanceController {
};
}
public async fetchInstances({ instanceName, instanceId }: InstanceDto) {
public async fetchInstances({ instanceName, instanceId, number }: InstanceDto) {
if (instanceName) {
this.logger.verbose('requested fetchInstances from ' + instanceName + ' instance');
this.logger.verbose('instanceName: ' + instanceName);
return this.waMonitor.instanceInfo(instanceName);
} else if (instanceId) {
return this.waMonitor.instanceInfoById(instanceId);
} else if (instanceId || number) {
return this.waMonitor.instanceInfoById(instanceId, number);
}
this.logger.verbose('requested fetchInstances (all instances)');