]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/video/redundancy.service.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video / redundancy.service.ts
index 6e839e655f14a6161ffc4e3080c3403e526b544b..4377d628a0da4ba25c92a52be4660cfe2c5a03d0 100644 (file)
@@ -1,6 +1,6 @@
 import { SortMeta } from 'primeng/api'
 import { concat, Observable } from 'rxjs'
-import { catchError, map, toArray } from 'rxjs/operators'
+import { catchError, toArray } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { RestExtractor, RestPagination, RestService } from '@app/core'
@@ -23,15 +23,12 @@ export class RedundancyService {
     const body = { redundancyAllowed }
 
     return this.authHttp.put(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   listVideoRedundancies (options: {
-    pagination: RestPagination,
-    sort: SortMeta,
+    pagination: RestPagination
+    sort: SortMeta
     target?: VideoRedundanciesTarget
   }): Observable<ResultList<VideoRedundancy>> {
     const { pagination, sort, target } = options
@@ -65,9 +62,6 @@ export class RedundancyService {
 
   private removeRedundancy (redundancyId: number) {
     return this.authHttp.delete(RedundancyService.BASE_REDUNDANCY_URL + '/videos/' + redundancyId)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 }