diff options
Diffstat (limited to 'client/src/app/shared/video-abuse')
-rw-r--r-- | client/src/app/shared/video-abuse/video-abuse.service.ts | 8 |
1 files changed, 3 insertions, 5 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 2750a41c7..f23c36f05 100644 --- a/client/src/app/shared/video-abuse/video-abuse.service.ts +++ b/client/src/app/shared/video-abuse/video-abuse.service.ts | |||
@@ -6,7 +6,7 @@ import 'rxjs/add/operator/map'; | |||
6 | 6 | ||
7 | import { AuthService } from '../core'; | 7 | import { AuthService } from '../core'; |
8 | import { AuthHttp } from '../auth'; | 8 | import { AuthHttp } from '../auth'; |
9 | import { RestExtractor, ResultList } from '../rest'; | 9 | import { RestDataSource, RestExtractor, ResultList } from '../rest'; |
10 | import { VideoAbuse } from './video-abuse.model'; | 10 | import { VideoAbuse } from './video-abuse.model'; |
11 | 11 | ||
12 | @Injectable() | 12 | @Injectable() |
@@ -18,10 +18,8 @@ export class VideoAbuseService { | |||
18 | private restExtractor: RestExtractor | 18 | private restExtractor: RestExtractor |
19 | ) {} | 19 | ) {} |
20 | 20 | ||
21 | getVideoAbuses() { | 21 | getDataSource() { |
22 | return this.authHttp.get(VideoAbuseService.BASE_VIDEO_ABUSE_URL + 'abuse') | 22 | return new RestDataSource(this.authHttp, VideoAbuseService.BASE_VIDEO_ABUSE_URL + 'abuse'); |
23 | .map(this.restExtractor.extractDataList) | ||
24 | .map(this.extractVideoAbuses) | ||
25 | } | 23 | } |
26 | 24 | ||
27 | reportVideo(id: string, reason: string) { | 25 | reportVideo(id: string, reason: string) { |