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

Fix bug in comment service

parent 150f13ea
No related merge requests found
......@@ -43,7 +43,6 @@ export class CommentComponent implements OnInit {
setCorrect(comment: Comment): void {
comment.correct = !comment.correct;
this.commentService.updateComment(comment).subscribe();
console.log('is' + comment.correct);
}
delete(comment: Comment): void {
......
......@@ -60,7 +60,7 @@ export class CommentService extends BaseHttpService {
}
updateComment(comment: Comment): Observable<any> {
const connectionUrl = this.apiUrl + this.apiUrl.comment + '/' + comment.id;
const connectionUrl = this.apiUrl.base + this.apiUrl.comment + '/' + comment.id;
return this.http.put(connectionUrl, comment, httpOptions).pipe(
tap(_ => ''),
catchError(this.handleError<any>('updateComment'))
......
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