From b8b8102933f00832a6f348b736fe8eb633a36470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Thu, 15 Mar 2018 10:16:07 +0100 Subject: [PATCH] Adjust room-creation Fix demo room joining --- src/app/join-room/join-room.component.html | 2 +- src/app/room-modification/room-modification.component.html | 2 +- src/app/room.service.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/join-room/join-room.component.html b/src/app/join-room/join-room.component.html index d491d9e40..5a70e3b89 100644 --- a/src/app/join-room/join-room.component.html +++ b/src/app/join-room/join-room.component.html @@ -10,5 +10,5 @@ <mat-icon>send</mat-icon> </button> </div> - <button mat-button color="primary" (click)="joinDemo()">Join demo room <mat-icon>lightbulb_outline</mat-icon></button> </form> +<button mat-button color="primary" (click)="joinDemo()">Join demo room <mat-icon>lightbulb_outline</mat-icon></button> diff --git a/src/app/room-modification/room-modification.component.html b/src/app/room-modification/room-modification.component.html index e5b25370e..ec6dd5b78 100644 --- a/src/app/room-modification/room-modification.component.html +++ b/src/app/room-modification/room-modification.component.html @@ -3,7 +3,7 @@ <input [(ngModel)]="editRoom.name" #roomName matInput/> </mat-form-field> <mat-form-field class="input-block"> - <input [(ngModel)]="editRoom.shortId" #roomShortID matInput/> + <input [(ngModel)]="editRoom.abbreviation" #roomAbbreviation matInput/> </mat-form-field> <mat-form-field class="input-block"> <textarea [(ngModel)]="editRoom.description" #roomDescription matInput matTextareaAutosize diff --git a/src/app/room.service.ts b/src/app/room.service.ts index 6d04fa338..2a1f4926a 100644 --- a/src/app/room.service.ts +++ b/src/app/room.service.ts @@ -66,10 +66,10 @@ export class RoomService extends ErrorHandlingService { } updateRoom(room: Room): Observable<Room> { - const connectionUrl = `${this.apiBaseUrl}${this.roomsUrl}/${room.id}`; + const connectionUrl = `${this.apiBaseUrl}${this.roomsUrl}/~${room.shortId}`; return this.http.put(connectionUrl, { - shortId: room.shortId, ownerId: this.authService.getUser().userId, - abbreviation: room.abbreviation, name: room.name, closed: room.closed, description: room.description + ownerId: this.authService.getUser().userId, + abbreviation: room.abbreviation, name: room.name, description: room.description }, httpOptions).pipe( tap(_ => ''), catchError(this.handleError<any>('updateRoom')) -- GitLab