diff --git a/src/app/comment.service.ts b/src/app/comment.service.ts index c5743daf474a7fed7ea4536e805ffc48e09ca0f3..48f7d8e356f0ed53a2acf75b366ba4aa43e6a9cd 100644 --- a/src/app/comment.service.ts +++ b/src/app/comment.service.ts @@ -17,4 +17,9 @@ export class CommentService { addComment(comment: Comment): Observable<Comment> { return this.http.post<Comment>(this.commentsUrl, comment, httpOptions); } + + getComments(roomId: string): Observable<Comment[]> { + const url = `${this.commentsUrl}/?roomId=${roomId}`; + return this.http.get<Comment[]>(url); + } }