mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-21 11:37:23 -06:00
Merge pull request #187 from jaison-x/deleting-instances
Deleting instances
This commit is contained in:
commit
b0a0e805cf
@ -553,15 +553,13 @@ export class InstanceController {
|
|||||||
this.logger.verbose('logging out instance: ' + instanceName);
|
this.logger.verbose('logging out instance: ' + instanceName);
|
||||||
|
|
||||||
await this.logout({ instanceName });
|
await this.logout({ instanceName });
|
||||||
delete this.waMonitor.waInstances[instanceName];
|
|
||||||
return { status: 'SUCCESS', error: false, response: { message: 'Instance deleted' } };
|
|
||||||
} else {
|
|
||||||
this.logger.verbose('deleting instance: ' + instanceName);
|
|
||||||
|
|
||||||
delete this.waMonitor.waInstances[instanceName];
|
|
||||||
this.eventEmitter.emit('remove.instance', instanceName, 'inner');
|
|
||||||
return { status: 'SUCCESS', error: false, response: { message: 'Instance deleted' } };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.logger.verbose('deleting instance: ' + instanceName);
|
||||||
|
|
||||||
|
delete this.waMonitor.waInstances[instanceName];
|
||||||
|
this.eventEmitter.emit('remove.instance', instanceName, 'inner');
|
||||||
|
return { status: 'SUCCESS', error: false, response: { message: 'Instance deleted' } };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new BadRequestException(error.toString());
|
throw new BadRequestException(error.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user