fix: include instance Id field in the instance configuration

This commit is contained in:
Davidson Gomes
2023-12-17 07:04:33 -03:00
parent cf89601269
commit 7cc324e1c0
3 changed files with 98 additions and 1 deletions

View File

@@ -591,11 +591,13 @@ export class InstanceController {
};
}
public async fetchInstances({ instanceName }: InstanceDto) {
public async fetchInstances({ instanceName, instanceId }: 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);
}
this.logger.verbose('requested fetchInstances (all instances)');