aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-block/video-block.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video-block/video-block.service.ts')
-rw-r--r--client/src/app/shared/video-block/video-block.service.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/shared/video-block/video-block.service.ts b/client/src/app/shared/video-block/video-block.service.ts
index 67ca1d85b..31ccc84ea 100644
--- a/client/src/app/shared/video-block/video-block.service.ts
+++ b/client/src/app/shared/video-block/video-block.service.ts
@@ -3,7 +3,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { SortMeta } from 'primeng/api' 4import { SortMeta } from 'primeng/api'
5import { from as observableFrom, Observable } from 'rxjs' 5import { from as observableFrom, Observable } from 'rxjs'
6import { VideoBlocklist, VideoBlockType, ResultList } from '../../../../../shared' 6import { VideoBlacklist, VideoBlacklistType, ResultList } from '../../../../../shared'
7import { environment } from '../../../environments/environment' 7import { environment } from '../../../environments/environment'
8import { RestExtractor, RestPagination, RestService } from '../rest' 8import { RestExtractor, RestPagination, RestService } from '../rest'
9 9
@@ -21,8 +21,8 @@ export class VideoBlockService {
21 pagination: RestPagination 21 pagination: RestPagination
22 sort: SortMeta 22 sort: SortMeta
23 search?: string 23 search?: string
24 type?: VideoBlockType 24 type?: VideoBlacklistType
25 }): Observable<ResultList<VideoBlocklist>> { 25 }): Observable<ResultList<VideoBlacklist>> {
26 const { pagination, sort, search, type } = options 26 const { pagination, sort, search, type } = options
27 27
28 let params = new HttpParams() 28 let params = new HttpParams()
@@ -33,8 +33,8 @@ export class VideoBlockService {
33 type: { 33 type: {
34 prefix: 'type:', 34 prefix: 'type:',
35 handler: v => { 35 handler: v => {
36 if (v === 'manual') return VideoBlockType.MANUAL 36 if (v === 'manual') return VideoBlacklistType.MANUAL
37 if (v === 'auto') return VideoBlockType.AUTO_BEFORE_PUBLISHED 37 if (v === 'auto') return VideoBlacklistType.AUTO_BEFORE_PUBLISHED
38 38
39 return undefined 39 return undefined
40 } 40 }
@@ -44,7 +44,7 @@ export class VideoBlockService {
44 params = this.restService.addObjectParams(params, filters) 44 params = this.restService.addObjectParams(params, filters)
45 } 45 }
46 46
47 return this.authHttp.get<ResultList<VideoBlocklist>>(VideoBlockService.BASE_VIDEOS_URL + 'blacklist', { params }) 47 return this.authHttp.get<ResultList<VideoBlacklist>>(VideoBlockService.BASE_VIDEOS_URL + 'blacklist', { params })
48 .pipe( 48 .pipe(
49 map(res => this.restExtractor.convertResultListDateToHuman(res)), 49 map(res => this.restExtractor.convertResultListDateToHuman(res)),
50 catchError(res => this.restExtractor.handleError(res)) 50 catchError(res => this.restExtractor.handleError(res))