mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-25 01:48:39 -06:00
fix: webhook
This commit is contained in:
parent
5f4a1b96ce
commit
19fb9fcd31
@ -622,10 +622,15 @@ export class InstanceController {
|
|||||||
|
|
||||||
this.logger.verbose('deleting instance: ' + instanceName);
|
this.logger.verbose('deleting instance: ' + instanceName);
|
||||||
|
|
||||||
this.waMonitor.waInstances[instanceName].sendDataWebhook(Events.INSTANCE_DELETE, {
|
try {
|
||||||
instanceName,
|
this.waMonitor.waInstances[instanceName].sendDataWebhook(Events.INSTANCE_DELETE, {
|
||||||
instanceId: (await this.repository.auth.find(instanceName))?.instanceId,
|
instanceName,
|
||||||
});
|
instanceId: (await this.repository.auth.find(instanceName))?.instanceId,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
this.logger.error(error);
|
||||||
|
}
|
||||||
|
|
||||||
delete this.waMonitor.waInstances[instanceName];
|
delete this.waMonitor.waInstances[instanceName];
|
||||||
this.eventEmitter.emit('remove.instance', instanceName, 'inner');
|
this.eventEmitter.emit('remove.instance', instanceName, 'inner');
|
||||||
return { status: 'SUCCESS', error: false, response: { message: 'Instance deleted' } };
|
return { status: 'SUCCESS', error: false, response: { message: 'Instance deleted' } };
|
||||||
|
Loading…
Reference in New Issue
Block a user