diff --git a/src/app/create-comment/create-comment.component.ts b/src/app/create-comment/create-comment.component.ts index f999946d7b8b55e16344b2db9a189b6c70fe1418..a82a11c7041971cea23f77467648ff3cf48a0c3c 100644 --- a/src/app/create-comment/create-comment.component.ts +++ b/src/app/create-comment/create-comment.component.ts @@ -46,9 +46,9 @@ export class CreateCommentComponent implements OnInit { return; } this.commentService.addComment({ - id: this.room.id + this.user.userId, + id: this.room.id + this.user.id, roomId: this.room.id, - userId: this.user.userId, + userId: this.user.id, subject: subject, body: body, creationTimestamp: new Date(Date.now()) diff --git a/src/app/room.service.ts b/src/app/room.service.ts index b48f9dcec1699fd279bf943b4152cff3d6aff6e4..c5fe100fe700c430c2cf4698d38464d2fe5d2ff0 100644 --- a/src/app/room.service.ts +++ b/src/app/room.service.ts @@ -32,7 +32,7 @@ export class RoomService extends ErrorHandlingService { return this.http.post<Room[]>(getRoomsUrl, { properties: {}, externalFilters: { - ownerId: this.authenticationService.getUser().userId + ownerId: this.authenticationService.getUser().id } }, httpOptions); }