Skip to content
Snippets Groups Projects
Verified Commit b8b81029 authored by Lukas Mauß's avatar Lukas Mauß Committed by Lukas Maximilian Kimpel
Browse files

Adjust room-creation

Fix demo room joining
parent c01d351f
No related merge requests found
......@@ -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>
......@@ -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
......
......@@ -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'))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment