Skip to content

Commit 091b920

Browse files
committed
fix: It is now validated if the instance name contains uppercase and special characters
1 parent d7f264c commit 091b920

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/whatsapp/repository/repository.manager.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export class RepositoryBroker {
5555
const chatwootDir = join(storePath, 'chatwoot');
5656
const tempDir = join(storePath, 'temp');
5757

58-
// Check if directories exist, create them if not
5958
if (!fs.existsSync(authDir)) {
6059
this.logger.verbose('creating auth dir: ' + authDir);
6160
fs.mkdirSync(authDir, { recursive: true });
@@ -91,6 +90,21 @@ export class RepositoryBroker {
9190
} catch (error) {
9291
this.logger.error(error);
9392
}
93+
} else {
94+
const storePath = join(process.cwd(), 'store');
95+
96+
this.logger.verbose('creating store path: ' + storePath);
97+
98+
const tempDir = join(storePath, 'temp');
99+
100+
if (!fs.existsSync(tempDir)) {
101+
this.logger.verbose('creating temp dir: ' + tempDir);
102+
fs.mkdirSync(tempDir, { recursive: true });
103+
}
104+
try {
105+
} catch (error) {
106+
this.logger.error(error);
107+
}
94108
}
95109
}
96110
}

0 commit comments

Comments
 (0)