X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fvideo%2Fredundancy.service.ts;h=4377d628a0da4ba25c92a52be4660cfe2c5a03d0;hb=83b1b7eaf1c04837f92de497e74895bee808eb83;hp=6e839e655f14a6161ffc4e3080c3403e526b544b;hpb=67ed6552b831df66713bac9e672738796128d33f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-main/video/redundancy.service.ts b/client/src/app/shared/shared-main/video/redundancy.service.ts index 6e839e655..4377d628a 100644 --- a/client/src/app/shared/shared-main/video/redundancy.service.ts +++ b/client/src/app/shared/shared-main/video/redundancy.service.ts @@ -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> { 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))) } }