@@ -23,7 +23,13 @@ export class InstanceController {
2323
2424 private readonly logger = new Logger ( InstanceController . name ) ;
2525
26- public async createInstance ( { instanceName, webhook, events, qrcode } : InstanceDto ) {
26+ public async createInstance ( {
27+ instanceName,
28+ webhook,
29+ events,
30+ qrcode,
31+ token,
32+ } : InstanceDto ) {
2733 const mode = this . configService . get < Auth > ( 'AUTHENTICATION' ) . INSTANCE . MODE ;
2834
2935 if ( mode === 'container' ) {
@@ -43,9 +49,12 @@ export class InstanceController {
4349 this . waMonitor . waInstances [ instance . instanceName ] = instance ;
4450 this . waMonitor . delInstanceTime ( instance . instanceName ) ;
4551
46- const hash = await this . authService . generateHash ( {
47- instanceName : instance . instanceName ,
48- } ) ;
52+ const hash = await this . authService . generateHash (
53+ {
54+ instanceName : instance . instanceName ,
55+ } ,
56+ token ,
57+ ) ;
4958
5059 let getEvents : string [ ] ;
5160
@@ -78,9 +87,12 @@ export class InstanceController {
7887 this . waMonitor . waInstances [ instance . instanceName ] = instance ;
7988 this . waMonitor . delInstanceTime ( instance . instanceName ) ;
8089
81- const hash = await this . authService . generateHash ( {
82- instanceName : instance . instanceName ,
83- } ) ;
90+ const hash = await this . authService . generateHash (
91+ {
92+ instanceName : instance . instanceName ,
93+ } ,
94+ token ,
95+ ) ;
8496
8597 let getEvents : string [ ] ;
8698
0 commit comments