aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-abuse
diff options
context:
space:
mode:
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}