fix: Adjust in create store files

This commit is contained in:
Davidson Gomes 2023-07-20 07:14:07 -03:00
parent 65e1620b43
commit 2d20a07dfb

View File

@ -53,6 +53,7 @@ export class RepositoryBroker {
const messageUpDir = join(storePath, 'message-up');
const webhookDir = join(storePath, 'webhook');
const chatwootDir = join(storePath, 'chatwoot');
const tempDir = join(storePath, 'temp');
// Check if directories exist, create them if not
if (!fs.existsSync(authDir)) {
@ -83,6 +84,10 @@ export class RepositoryBroker {
this.logger.verbose('creating chatwoot dir: ' + chatwootDir);
fs.mkdirSync(chatwootDir, { recursive: true });
}
if (!fs.existsSync(tempDir)) {
this.logger.verbose('creating temp dir: ' + tempDir);
fs.mkdirSync(tempDir, { recursive: true });
}
} catch (error) {
this.logger.error(error);
}