Skip to content

Commit 918cf29

Browse files
committed
fix: clean instance without chatwoot
1 parent 9f30c7b commit 918cf29

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)