]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comment.service.ts
Delete highlighted comment too if needed
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment.service.ts
index 5b9a991a031552f3d50f56c64f8a36ac07ae280d..73526cb3e757414f4ffca33bd114299174a042a5 100644 (file)
@@ -31,8 +31,8 @@ export class VideoCommentService {
 
     return this.authHttp.post(url, normalizedComment)
                .pipe(
-      map(data => this.extractVideoComment(data['comment'])),
-      catchError(this.restExtractor.handleError)
+                  map(data => this.extractVideoComment(data['comment'])),
+                  catchError(err => this.restExtractor.handleError(err))
                )
   }
 
@@ -43,7 +43,7 @@ export class VideoCommentService {
     return this.authHttp.post(url, normalizedComment)
                .pipe(
                  map(data => this.extractVideoComment(data[ 'comment' ])),
-                 catchError(this.restExtractor.handleError)
+                 catchError(err => this.restExtractor.handleError(err))
                )
   }
 
@@ -62,7 +62,7 @@ export class VideoCommentService {
                .get(url, { params })
                .pipe(
                  map(this.extractVideoComments),
-                 catchError((res) => this.restExtractor.handleError(res))
+                 catchError(err => this.restExtractor.handleError(err))
                )
   }
 
@@ -73,7 +73,7 @@ export class VideoCommentService {
                .get(url)
                .pipe(
                  map(tree => this.extractVideoCommentTree(tree as VideoCommentThreadTree)),
-                 catchError((res) => this.restExtractor.handleError(res))
+                 catchError(err => this.restExtractor.handleError(err))
                )
   }
 
@@ -84,7 +84,7 @@ export class VideoCommentService {
                .delete(url)
                .pipe(
                  map(this.restExtractor.extractDataBool),
-                 catchError((res) => this.restExtractor.handleError(res))
+                 catchError(err => this.restExtractor.handleError(err))
                )
   }