mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
fix: expose integration in fetch instance
This commit is contained in:
parent
16c2e28e9c
commit
bc6944736e
@ -107,6 +107,12 @@ export class WAMonitoringService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const findIntegration = await this.repository.integration.find(key);
|
||||||
|
const integration = {
|
||||||
|
...findIntegration,
|
||||||
|
webhook_wa_business: `${urlServer}/webhook/whatsapp/${encodeURIComponent(key)}`,
|
||||||
|
};
|
||||||
|
|
||||||
if (value.connectionStatus.state === 'open') {
|
if (value.connectionStatus.state === 'open') {
|
||||||
this.logger.verbose('instance: ' + key + ' - connectionStatus: open');
|
this.logger.verbose('instance: ' + key + ' - connectionStatus: open');
|
||||||
|
|
||||||
@ -128,6 +134,8 @@ export class WAMonitoringService {
|
|||||||
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
||||||
|
|
||||||
instanceData.instance['chatwoot'] = chatwoot;
|
instanceData.instance['chatwoot'] = chatwoot;
|
||||||
|
|
||||||
|
instanceData.instance['integration'] = integration;
|
||||||
}
|
}
|
||||||
|
|
||||||
instances.push(instanceData);
|
instances.push(instanceData);
|
||||||
@ -148,6 +156,8 @@ export class WAMonitoringService {
|
|||||||
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
||||||
|
|
||||||
instanceData.instance['chatwoot'] = chatwoot;
|
instanceData.instance['chatwoot'] = chatwoot;
|
||||||
|
|
||||||
|
instanceData.instance['integration'] = integration;
|
||||||
}
|
}
|
||||||
|
|
||||||
instances.push(instanceData);
|
instances.push(instanceData);
|
||||||
@ -189,6 +199,12 @@ export class WAMonitoringService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const findIntegration = await this.repository.integration.find(key);
|
||||||
|
const integration = {
|
||||||
|
...findIntegration,
|
||||||
|
webhook_wa_business: `${urlServer}/webhook/whatsapp/${encodeURIComponent(key)}`,
|
||||||
|
};
|
||||||
|
|
||||||
if (value.connectionStatus.state === 'open') {
|
if (value.connectionStatus.state === 'open') {
|
||||||
this.logger.verbose('instance: ' + key + ' - connectionStatus: open');
|
this.logger.verbose('instance: ' + key + ' - connectionStatus: open');
|
||||||
|
|
||||||
@ -210,6 +226,8 @@ export class WAMonitoringService {
|
|||||||
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
||||||
|
|
||||||
instanceData.instance['chatwoot'] = chatwoot;
|
instanceData.instance['chatwoot'] = chatwoot;
|
||||||
|
|
||||||
|
instanceData.instance['integration'] = integration;
|
||||||
}
|
}
|
||||||
|
|
||||||
instances.push(instanceData);
|
instances.push(instanceData);
|
||||||
@ -230,6 +248,8 @@ export class WAMonitoringService {
|
|||||||
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
instanceData.instance['apikey'] = (await this.repository.auth.find(key))?.apikey;
|
||||||
|
|
||||||
instanceData.instance['chatwoot'] = chatwoot;
|
instanceData.instance['chatwoot'] = chatwoot;
|
||||||
|
|
||||||
|
instanceData.instance['integration'] = integration;
|
||||||
}
|
}
|
||||||
|
|
||||||
instances.push(instanceData);
|
instances.push(instanceData);
|
||||||
|
Loading…
Reference in New Issue
Block a user