File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -95,12 +95,26 @@ export class WAMonitoringService {
9595 } ) ;
9696 }
9797 } else {
98- instances . push ( {
99- instance : {
100- instanceName : key ,
101- status : value . connectionStatus . state ,
102- } ,
103- } ) ;
98+ let apikey : string ;
99+ if ( this . configService . get < Auth > ( 'AUTHENTICATION' ) . EXPOSE_IN_FETCH_INSTANCES ) {
100+ const tokenStore = await this . repository . auth . find ( key ) ;
101+ apikey = tokenStore . apikey || 'Apikey not found' ;
102+
103+ instances . push ( {
104+ instance : {
105+ instanceName : key ,
106+ status : value . connectionStatus . state ,
107+ apikey,
108+ } ,
109+ } ) ;
110+ } else {
111+ instances . push ( {
112+ instance : {
113+ instanceName : key ,
114+ status : value . connectionStatus . state ,
115+ } ,
116+ } ) ;
117+ }
104118 }
105119 }
106120 }
You can’t perform that action at this time.
0 commit comments