diff --git a/src/app/room-creation/room-creation.component.ts b/src/app/room-creation/room-creation.component.ts index 308a0341ceed2e4df7958ba7460e37044431913d..01733d1dae43a70d674bfd78531536c818578679 100644 --- a/src/app/room-creation/room-creation.component.ts +++ b/src/app/room-creation/room-creation.component.ts @@ -46,14 +46,11 @@ export class RoomCreationComponent implements OnInit { name: longRoomName, abbreviation: shortRoomName, description: description - } as Room).subscribe(room => this.room = room); - this.roomService.getRoomById(this.roomId) - .subscribe(room => { - this.room = room; - this.notification.show(`Room '${this.room.name}' successfully created.`); - this.router.navigate([`/creator/room/${this.room.shortId}`]); - this.dialogRef.close(); - }); + } as Room).subscribe(room => { + this.room = room; + this.notification.show(`Room '${this.room.name}' successfully created.`); + this.router.navigate([`/creator/room/${this.room.shortId}`]); + this.dialogRef.close(); + }); } } -