X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fvideo%2Fredundancy.service.ts;h=4377d628a0da4ba25c92a52be4660cfe2c5a03d0;hb=21393652621efba8a95715c6f340515d58599ec6;hp=966d7fafd426e76efa2f87488cb5080eca6796ed;hpb=9df52d660feb722404be00a50f3c8a612bec1c15;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 966d7fafd..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,10 +23,7 @@ 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: { @@ -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))) } }