diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-30 22:41:14 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-30 22:41:14 +0100 |
commit | 28798b5d949826551740fc893d06e6424b77aa6a (patch) | |
tree | e235a7f49164a06c4b76df49ca61b89998d4ed81 /client/src/app/shared/video-abuse | |
parent | 13fc89f4a4b91b3da10493517de556240fb65463 (diff) | |
download | PeerTube-28798b5d949826551740fc893d06e6424b77aa6a.tar.gz PeerTube-28798b5d949826551740fc893d06e6424b77aa6a.tar.zst PeerTube-28798b5d949826551740fc893d06e6424b77aa6a.zip |
Client: replace simple tables by ng2 smart table component
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) { |