Merge pull request #880 from joaosouz4dev/v2.0.0

fix: clean instance without chatwoot
This commit is contained in:
Davidson Gomes 2024-09-12 15:04:53 -03:00 committed by GitHub
commit ade5f8d122
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,7 +148,9 @@ export class WAMonitoringService {
} }
public async cleaningStoreData(instanceName: string) { public async cleaningStoreData(instanceName: string) {
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED) {
execSync(`rm -rf ${join(STORE_DIR, 'chatwoot', instanceName + '*')}`); execSync(`rm -rf ${join(STORE_DIR, 'chatwoot', instanceName + '*')}`);
}
const instance = await this.prismaRepository.instance.findFirst({ const instance = await this.prismaRepository.instance.findFirst({
where: { name: instanceName }, where: { name: instanceName },