From a79e493dc7b73ff479b38b5e752ef019b31b1d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Wed, 14 Mar 2018 16:24:03 +0100 Subject: [PATCH] Adjust room service' getRooms() so that the user gets the rooms which he has created --- src/app/room.service.ts | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/app/room.service.ts b/src/app/room.service.ts index 441108c3a..a479c71b1 100644 --- a/src/app/room.service.ts +++ b/src/app/room.service.ts @@ -24,29 +24,18 @@ export class RoomService extends ErrorHandlingService { getRooms(): Observable<Room[]> { const url = this.apiBaseUrl + this.roomsUrl + this.findRoomsUrl; return this.http.post<Room[]>(url, { - properties: {}, - externalFilters: { inHistoryOfUserId: this.authService.getUser().userId } + properties: { ownerId: this.authService.getUser().userId }, + externalFilters: {} }).pipe( tap(_ => ''), catchError(this.handleError('getRooms', [])) ); } - getRoomsCreator(): Observable<Room[]> { - const getRoomsUrl = 'https://arsnova-staging.mni.thm.de/api/room/find'; - - return this.http.post<Room[]>(getRoomsUrl, { - properties: {}, - externalFilters: { - ownerId: this.authService.getUser().userId - } - }, httpOptions); - } - addRoom(room: Room): Observable<Room> { const connectionUrl = this.apiBaseUrl + this.roomsUrl + '/'; return this.http.post<Room>(connectionUrl, { - shortId: room.shortId, ownerId: this.authService.getUser().userId, + ownerId: this.authService.getUser().userId, abbreviation: room.abbreviation, name: room.name, closed: room.closed, description: room.description }, httpOptions); } -- GitLab