diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-31 10:41:44 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-31 10:41:44 +0100 |
commit | 61bbc7277501692d1520a421dff5af5d38ba6cf4 (patch) | |
tree | 4c705f7f42f70fc33f5233a4d79b6a6826482cc5 /client/src/app/shared/video-blacklist | |
parent | 915c5bbe538769b1d3430b27817d6a861c766ef3 (diff) | |
download | PeerTube-61bbc7277501692d1520a421dff5af5d38ba6cf4.tar.gz PeerTube-61bbc7277501692d1520a421dff5af5d38ba6cf4.tar.zst PeerTube-61bbc7277501692d1520a421dff5af5d38ba6cf4.zip |
Fix human dates in result lists
Diffstat (limited to 'client/src/app/shared/video-blacklist')
-rw-r--r-- | client/src/app/shared/video-blacklist/video-blacklist.service.ts | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/client/src/app/shared/video-blacklist/video-blacklist.service.ts b/client/src/app/shared/video-blacklist/video-blacklist.service.ts index 1231690aa..14c8b5dc0 100644 --- a/client/src/app/shared/video-blacklist/video-blacklist.service.ts +++ b/client/src/app/shared/video-blacklist/video-blacklist.service.ts | |||
@@ -7,7 +7,6 @@ import { Observable } from 'rxjs/Observable' | |||
7 | import { BlacklistedVideo, ResultList } from '../../../../../shared' | 7 | import { BlacklistedVideo, ResultList } from '../../../../../shared' |
8 | import { environment } from '../../../environments/environment' | 8 | import { environment } from '../../../environments/environment' |
9 | import { RestExtractor, RestPagination, RestService } from '../rest' | 9 | import { RestExtractor, RestPagination, RestService } from '../rest' |
10 | import { Utils } from '../utils' | ||
11 | 10 | ||
12 | @Injectable() | 11 | @Injectable() |
13 | export class VideoBlacklistService { | 12 | export class VideoBlacklistService { |
@@ -25,7 +24,6 @@ export class VideoBlacklistService { | |||
25 | 24 | ||
26 | return this.authHttp.get<ResultList<BlacklistedVideo>>(VideoBlacklistService.BASE_VIDEOS_URL + 'blacklist', { params }) | 25 | return this.authHttp.get<ResultList<BlacklistedVideo>>(VideoBlacklistService.BASE_VIDEOS_URL + 'blacklist', { params }) |
27 | .map(res => this.restExtractor.convertResultListDateToHuman(res)) | 26 | .map(res => this.restExtractor.convertResultListDateToHuman(res)) |
28 | .map(res => this.restExtractor.applyToResultListData(res, this.formatBlacklistedVideo.bind(this))) | ||
29 | .catch(res => this.restExtractor.handleError(res)) | 27 | .catch(res => this.restExtractor.handleError(res)) |
30 | } | 28 | } |
31 | 29 | ||
@@ -40,10 +38,4 @@ export class VideoBlacklistService { | |||
40 | .map(this.restExtractor.extractDataBool) | 38 | .map(this.restExtractor.extractDataBool) |
41 | .catch(res => this.restExtractor.handleError(res)) | 39 | .catch(res => this.restExtractor.handleError(res)) |
42 | } | 40 | } |
43 | |||
44 | private formatBlacklistedVideo (blacklistedVideo: BlacklistedVideo) { | ||
45 | return Object.assign(blacklistedVideo, { | ||
46 | createdAt: Utils.dateToHuman(blacklistedVideo.createdAt) | ||
47 | }) | ||
48 | } | ||
49 | } | 41 | } |