diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-09 16:07:10 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-10 21:12:09 +0200 |
commit | 3487330d308166afb542cbacae0475693c0b059e (patch) | |
tree | 6a7b6ea3dd105661354bf0df6c6d3f7a7abe64e8 /client/src/app/shared/video-block | |
parent | 5baee5fca418487e72ddcd6419d31bca8659b668 (diff) | |
download | PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.gz PeerTube-3487330d308166afb542cbacae0475693c0b059e.tar.zst PeerTube-3487330d308166afb542cbacae0475693c0b059e.zip |
preserve original variable names server-side
Diffstat (limited to 'client/src/app/shared/video-block')
-rw-r--r-- | client/src/app/shared/video-block/video-block.service.ts | 12 |
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' | |||
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { SortMeta } from 'primeng/api' | 4 | import { SortMeta } from 'primeng/api' |
5 | import { from as observableFrom, Observable } from 'rxjs' | 5 | import { from as observableFrom, Observable } from 'rxjs' |
6 | import { VideoBlocklist, VideoBlockType, ResultList } from '../../../../../shared' | 6 | import { VideoBlacklist, VideoBlacklistType, ResultList } from '../../../../../shared' |
7 | import { environment } from '../../../environments/environment' | 7 | import { environment } from '../../../environments/environment' |
8 | import { RestExtractor, RestPagination, RestService } from '../rest' | 8 | import { 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)) |