diff options
Diffstat (limited to 'client/src/app/shared/video-abuse')
-rw-r--r-- | client/src/app/shared/video-abuse/video-abuse.service.ts | 11 |
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' | |||
5 | import 'rxjs/add/operator/map' | 5 | import 'rxjs/add/operator/map' |
6 | import { Observable } from 'rxjs/Observable' | 6 | import { Observable } from 'rxjs/Observable' |
7 | import { ResultList, VideoAbuse } from '../../../../../shared' | 7 | import { ResultList, VideoAbuse } from '../../../../../shared' |
8 | import { RestExtractor, RestPagination, RestService } from '../rest' | ||
9 | import { Utils } from '../utils' | ||
10 | import { environment } from '../../../environments/environment' | 8 | import { environment } from '../../../environments/environment' |
9 | import { RestExtractor, RestPagination, RestService } from '../rest' | ||
11 | 10 | ||
12 | @Injectable() | 11 | @Injectable() |
13 | export class VideoAbuseService { | 12 | export 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 | } |