We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdc72bc commit 631dd01Copy full SHA for 631dd01
1 file changed
src/whatsapp/services/monitor.service.ts
@@ -95,12 +95,26 @@ export class WAMonitoringService {
95
});
96
}
97
} else {
98
- instances.push({
99
- instance: {
100
- instanceName: key,
101
- status: value.connectionStatus.state,
102
- },
103
- });
+ let apikey: string;
+ if (this.configService.get<Auth>('AUTHENTICATION').EXPOSE_IN_FETCH_INSTANCES) {
+ const tokenStore = await this.repository.auth.find(key);
+ apikey = tokenStore.apikey || 'Apikey not found';
+
+ instances.push({
104
+ instance: {
105
+ instanceName: key,
106
+ status: value.connectionStatus.state,
107
+ apikey,
108
+ },
109
+ });
110
+ } else {
111
112
113
114
115
116
117
+ }
118
119
120
0 commit comments