Skip to content

Commit c8add7a

Browse files
brunovigo24DavidsonGomes
authored andcommitted
fix: trim whitespace from instanceName on creation
Prevents instances with trailing/leading whitespace in their names from becoming undeletable via the API or UI. Fixes #2543.
1 parent 3fb04ed commit c8add7a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/api/controllers/instance.controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export class InstanceController {
3636

3737
public async createInstance(instanceData: InstanceDto) {
3838
try {
39+
instanceData.instanceName = instanceData.instanceName?.trim();
40+
3941
const instance = channelController.init(instanceData, {
4042
configService: this.configService,
4143
eventEmitter: this.eventEmitter,

0 commit comments

Comments
 (0)