From 28798b5d949826551740fc893d06e6424b77aa6a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Jan 2017 22:41:14 +0100 Subject: Client: replace simple tables by ng2 smart table component --- client/src/app/shared/video-abuse/video-abuse.service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/video-abuse/video-abuse.service.ts') 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'; import { AuthService } from '../core'; import { AuthHttp } from '../auth'; -import { RestExtractor, ResultList } from '../rest'; +import { RestDataSource, RestExtractor, ResultList } from '../rest'; import { VideoAbuse } from './video-abuse.model'; @Injectable() @@ -18,10 +18,8 @@ export class VideoAbuseService { private restExtractor: RestExtractor ) {} - getVideoAbuses() { - return this.authHttp.get(VideoAbuseService.BASE_VIDEO_ABUSE_URL + 'abuse') - .map(this.restExtractor.extractDataList) - .map(this.extractVideoAbuses) + getDataSource() { + return new RestDataSource(this.authHttp, VideoAbuseService.BASE_VIDEO_ABUSE_URL + 'abuse'); } reportVideo(id: string, reason: string) { -- cgit v1.2.3