Skip to content

Commit ade5f8d

Browse files
Merge pull request #880 from joaosouz4dev/v2.0.0
fix: clean instance without chatwoot
2 parents 2947269 + a84bc18 commit ade5f8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/services/monitor.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ export class WAMonitoringService {
148148
}
149149

150150
public async cleaningStoreData(instanceName: string) {
151-
execSync(`rm -rf ${join(STORE_DIR, 'chatwoot', instanceName + '*')}`);
151+
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED) {
152+
execSync(`rm -rf ${join(STORE_DIR, 'chatwoot', instanceName + '*')}`);
153+
}
152154

153155
const instance = await this.prismaRepository.instance.findFirst({
154156
where: { name: instanceName },

0 commit comments

Comments
 (0)