feat: added option to generate qrcode as soon as the instance is created

This commit is contained in:
Davidson Gomes 2023-06-13 17:42:30 -03:00
parent fdc72bc84e
commit 631dd01c92

View File

@ -95,12 +95,26 @@ export class WAMonitoringService {
}); });
} }
} else { } else {
instances.push({ let apikey: string;
instance: { if (this.configService.get<Auth>('AUTHENTICATION').EXPOSE_IN_FETCH_INSTANCES) {
instanceName: key, const tokenStore = await this.repository.auth.find(key);
status: value.connectionStatus.state, apikey = tokenStore.apikey || 'Apikey not found';
},
}); instances.push({
instance: {
instanceName: key,
status: value.connectionStatus.state,
apikey,
},
});
} else {
instances.push({
instance: {
instanceName: key,
status: value.connectionStatus.state,
},
});
}
} }
} }
} }