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'
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
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)))
}
}