diff --git a/src/app/join-room/join-room.component.ts b/src/app/join-room/join-room.component.ts index df9417c8ec40a4098a69bc6d72cf03de73bb80af..002f03f14c622af380b464a4d1d8b4e8a231777c 100644 --- a/src/app/join-room/join-room.component.ts +++ b/src/app/join-room/join-room.component.ts @@ -45,7 +45,7 @@ export class JoinRoomComponent implements OnInit { if (!room) { this.notificationService.show(`No room was found with id: ${id}`); } else { - this.router.navigate([`/participant/room/${this.room.id}`]); + this.router.navigate([`/participant/room/${this.room.shortId}`]); } }); } diff --git a/src/app/room.service.ts b/src/app/room.service.ts index f5a7310e3f33c1a188900cb5caec7a0de8f6fe37..441108c3a2338161833faaf3a85c5d2d67d7577c 100644 --- a/src/app/room.service.ts +++ b/src/app/room.service.ts @@ -18,8 +18,6 @@ export class RoomService extends ErrorHandlingService { constructor(private http: HttpClient, private authService: AuthenticationService) { - constructor(private http: HttpClient, - private authenticationService: AuthenticationService) { super(); } @@ -40,7 +38,7 @@ export class RoomService extends ErrorHandlingService { return this.http.post<Room[]>(getRoomsUrl, { properties: {}, externalFilters: { - ownerId: this.authenticationService.getUser().userId + ownerId: this.authService.getUser().userId } }, httpOptions); } @@ -50,14 +48,11 @@ export class RoomService extends ErrorHandlingService { return this.http.post<Room>(connectionUrl, { shortId: room.shortId, ownerId: this.authService.getUser().userId, abbreviation: room.abbreviation, name: room.name, closed: room.closed, description: room.description - }, httpOptions).pipe( - tap(_ => ''), - catchError(this.handleError<Room>('addRoom')) - ); + }, httpOptions); } getRoom(id: string): Observable<Room> { - const connectionUrl = `${this.apiBaseUrl}${this.roomsUrl}/${id}`; + const connectionUrl = `${ this.apiBaseUrl }${ this.roomsUrl }/~${id}`; return this.http.get<Room>(connectionUrl).pipe( catchError(this.handleError<Room>(`getRoom id=${id}`)) );