Skip to content

Commit 3570d7e

Browse files
authored
fix: trim whitespace from instanceName on creation (#2546)
Prevents instances with trailing/leading whitespace in their names from becoming undeletable via the API or UI. Fixes #2543.
1 parent 83efcd5 commit 3570d7e

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)