aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-abuse
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-31 10:41:44 +0100
committerChocobozzz <me@florianbigard.com>2018-01-31 10:41:44 +0100
commit61bbc7277501692d1520a421dff5af5d38ba6cf4 (patch)
tree4c705f7f42f70fc33f5233a4d79b6a6826482cc5 /client/src/app/shared/video-abuse
parent915c5bbe538769b1d3430b27817d6a861c766ef3 (diff)
downloadPeerTube-61bbc7277501692d1520a421dff5af5d38ba6cf4.tar.gz
PeerTube-61bbc7277501692d1520a421dff5af5d38ba6cf4.tar.zst
PeerTube-61bbc7277501692d1520a421dff5af5d38ba6cf4.zip
Fix human dates in result lists
Diffstat (limited to 'client/src/app/shared/video-abuse')
-rw-r--r--client/src/app/shared/video-abuse/video-abuse.service.ts11
1 files changed, 1 insertions, 10 deletions
diff --git a/client/src/app/shared/video-abuse/video-abuse.service.ts b/client/src/app/shared/video-abuse/video-abuse.service.ts
index 96a1f1fd2..ae00c4c45 100644
--- a/client/src/app/shared/video-abuse/video-abuse.service.ts
+++ b/client/src/app/shared/video-abuse/video-abuse.service.ts
@@ -5,9 +5,8 @@ import 'rxjs/add/operator/catch'
5import 'rxjs/add/operator/map' 5import 'rxjs/add/operator/map'
6import { Observable } from 'rxjs/Observable' 6import { Observable } from 'rxjs/Observable'
7import { ResultList, VideoAbuse } from '../../../../../shared' 7import { ResultList, VideoAbuse } from '../../../../../shared'
8import { RestExtractor, RestPagination, RestService } from '../rest'
9import { Utils } from '../utils'
10import { environment } from '../../../environments/environment' 8import { environment } from '../../../environments/environment'
9import { RestExtractor, RestPagination, RestService } from '../rest'
11 10
12@Injectable() 11@Injectable()
13export class VideoAbuseService { 12export class VideoAbuseService {
@@ -27,7 +26,6 @@ export class VideoAbuseService {
27 26
28 return this.authHttp.get<ResultList<VideoAbuse>>(url, { params }) 27 return this.authHttp.get<ResultList<VideoAbuse>>(url, { params })
29 .map(res => this.restExtractor.convertResultListDateToHuman(res)) 28 .map(res => this.restExtractor.convertResultListDateToHuman(res))
30 .map(res => this.restExtractor.applyToResultListData(res, this.formatVideoAbuse.bind(this)))
31 .catch(res => this.restExtractor.handleError(res)) 29 .catch(res => this.restExtractor.handleError(res))
32 } 30 }
33 31
@@ -41,11 +39,4 @@ export class VideoAbuseService {
41 .map(this.restExtractor.extractDataBool) 39 .map(this.restExtractor.extractDataBool)
42 .catch(res => this.restExtractor.handleError(res)) 40 .catch(res => this.restExtractor.handleError(res))
43 } 41 }
44
45 private formatVideoAbuse (videoAbuse: VideoAbuse) {
46 return Object.assign(videoAbuse, {
47 createdAt: Utils.dateToHuman(videoAbuse.createdAt)
48 })
49 }
50
51} 42}