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
4 merge requests!171SWTP Comment Project,!170Fix linter in pipe,!169WebSocket Connector,!168Filter comment list
...@@ -43,7 +43,6 @@ export class CommentComponent implements OnInit { ...@@ -43,7 +43,6 @@ export class CommentComponent implements OnInit {
setCorrect(comment: Comment): void { setCorrect(comment: Comment): void {
comment.correct = !comment.correct; comment.correct = !comment.correct;
this.commentService.updateComment(comment).subscribe(); this.commentService.updateComment(comment).subscribe();
console.log('is' + comment.correct);
} }
delete(comment: Comment): void { delete(comment: Comment): void {
......
...@@ -60,7 +60,7 @@ export class CommentService extends BaseHttpService { ...@@ -60,7 +60,7 @@ export class CommentService extends BaseHttpService {
} }
updateComment(comment: Comment): Observable<any> { 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( return this.http.put(connectionUrl, comment, httpOptions).pipe(
tap(_ => ''), tap(_ => ''),
catchError(this.handleError<any>('updateComment')) 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