Skip to content

Commit 28a7d9c

Browse files
committed
fix: Adjusts in instance name
1 parent 2ca344b commit 28a7d9c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/whatsapp/controllers/instance.controller.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,12 @@ export class InstanceController {
5555
try {
5656
this.logger.verbose('requested createInstance from ' + instanceName + ' instance');
5757

58-
if (instanceName !== instanceName.toLowerCase().replace(/[^a-z0-9]/g, '')) {
59-
throw new BadRequestException('The instance name must be lowercase and without special characters');
60-
}
61-
6258
this.logger.verbose('checking duplicate token');
6359
await this.authService.checkDuplicateToken(token);
6460

6561
this.logger.verbose('creating instance');
6662
const instance = new WAStartupService(this.configService, this.eventEmitter, this.repository, this.cache);
67-
instance.instanceName = instanceName
68-
.toLowerCase()
69-
.replace(/[^a-z0-9]/g, '')
70-
.replace(' ', '');
63+
instance.instanceName = instanceName;
7164

7265
this.logger.verbose('instance: ' + instance.instanceName + ' created');
7366

0 commit comments

Comments
 (0)