diff --git a/src/app/services/http/comment.service.ts b/src/app/services/http/comment.service.ts index 32f1f43ac5a6f40c2045e854b55e4d37ca4c69f8..7a4ce7ba2ea5a8ac4e7f47f51c1b94e75e559e7e 100644 --- a/src/app/services/http/comment.service.ts +++ b/src/app/services/http/comment.service.ts @@ -21,7 +21,12 @@ export class CommentService extends BaseHttpService { super(); } - /** TODO: getComment().. **/ + getComment(comment: Comment): Observable<Comment> { + return this.http.get<Comment>(`${ this.apiUrl.base }${ this.apiUrl.comment }/~${comment.id}`, httpOptions).pipe( + tap (_ => ''), + catchError(this.handleError<Comment>('addComment')) + ); + } addComment(comment: Comment): Observable<Comment> { return this.http.post<Comment>(this.apiUrl.base + this.apiUrl.comment + '/',