Skip to content
Snippets Groups Projects
Commit 15017e23 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Add getComment function

parent aae0fec7
No related merge requests found
......@@ -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 + '/',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment