aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/video/redundancy.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/video/redundancy.service.ts')
-rw-r--r--client/src/app/shared/shared-main/video/redundancy.service.ts12
1 files changed, 3 insertions, 9 deletions
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 @@
1import { SortMeta } from 'primeng/api' 1import { SortMeta } from 'primeng/api'
2import { concat, Observable } from 'rxjs' 2import { concat, Observable } from 'rxjs'
3import { catchError, map, toArray } from 'rxjs/operators' 3import { catchError, toArray } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
@@ -23,10 +23,7 @@ export class RedundancyService {
23 const body = { redundancyAllowed } 23 const body = { redundancyAllowed }
24 24
25 return this.authHttp.put(url, body) 25 return this.authHttp.put(url, body)
26 .pipe( 26 .pipe(catchError(err => this.restExtractor.handleError(err)))
27 map(this.restExtractor.extractDataBool),
28 catchError(err => this.restExtractor.handleError(err))
29 )
30 } 27 }
31 28
32 listVideoRedundancies (options: { 29 listVideoRedundancies (options: {
@@ -65,9 +62,6 @@ export class RedundancyService {
65 62
66 private removeRedundancy (redundancyId: number) { 63 private removeRedundancy (redundancyId: number) {
67 return this.authHttp.delete(RedundancyService.BASE_REDUNDANCY_URL + '/videos/' + redundancyId) 64 return this.authHttp.delete(RedundancyService.BASE_REDUNDANCY_URL + '/videos/' + redundancyId)
68 .pipe( 65 .pipe(catchError(res => this.restExtractor.handleError(res)))
69 map(this.restExtractor.extractDataBool),
70 catchError(res => this.restExtractor.handleError(res))
71 )
72 } 66 }
73} 67}