mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 20:02:20 -06:00
Now in the manager, when logging in with the client's apikey, the listing only shows the instance corresponding to the provided apikey (only with MongoDB)
This commit is contained in:
@@ -83,7 +83,7 @@ export class WAMonitoringService {
|
||||
}
|
||||
}
|
||||
|
||||
public async instanceInfo(instanceName?: string) {
|
||||
public async instanceInfo(instanceName?: string, arrayReturn = false) {
|
||||
this.logger.verbose('get instance info');
|
||||
if (instanceName && !this.waInstances[instanceName]) {
|
||||
throw new NotFoundException(`Instance "${instanceName}" not found`);
|
||||
@@ -171,6 +171,9 @@ export class WAMonitoringService {
|
||||
|
||||
this.logger.verbose('return instance info: ' + instances.length);
|
||||
|
||||
if (arrayReturn) {
|
||||
return [instances.find((i) => i.instance.instanceName === instanceName) ?? instances];
|
||||
}
|
||||
return instances.find((i) => i.instance.instanceName === instanceName) ?? instances;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user