diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-11 16:27:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-13 14:05:49 +0200 |
commit | c48e82b5e0478434de30626d14594a97f2402e7c (patch) | |
tree | a78e5272bd0fe4f5b41831e571e02d05f1515b82 /client/src/app/+admin/follows/shared/follow.service.ts | |
parent | a651038487faa838bda3ce04695b08bc65baff70 (diff) | |
download | PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.gz PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.tar.zst PeerTube-c48e82b5e0478434de30626d14594a97f2402e7c.zip |
Basic video redundancy implementation
Diffstat (limited to 'client/src/app/+admin/follows/shared/follow.service.ts')
-rw-r--r-- | client/src/app/+admin/follows/shared/follow.service.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts index 87ea5fb0c..27169a9cd 100644 --- a/client/src/app/+admin/follows/shared/follow.service.ts +++ b/client/src/app/+admin/follows/shared/follow.service.ts | |||
@@ -3,7 +3,7 @@ import { HttpClient, HttpParams } from '@angular/common/http' | |||
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { SortMeta } from 'primeng/primeng' | 4 | import { SortMeta } from 'primeng/primeng' |
5 | import { Observable } from 'rxjs' | 5 | import { Observable } from 'rxjs' |
6 | import { AccountFollow, ResultList } from '../../../../../../shared' | 6 | import { ActorFollow, ResultList } from '../../../../../../shared' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | import { RestExtractor, RestPagination, RestService } from '../../../shared' | 8 | import { RestExtractor, RestPagination, RestService } from '../../../shared' |
9 | 9 | ||
@@ -18,22 +18,22 @@ export class FollowService { | |||
18 | ) { | 18 | ) { |
19 | } | 19 | } |
20 | 20 | ||
21 | getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<AccountFollow>> { | 21 | getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<ActorFollow>> { |
22 | let params = new HttpParams() | 22 | let params = new HttpParams() |
23 | params = this.restService.addRestGetParams(params, pagination, sort) | 23 | params = this.restService.addRestGetParams(params, pagination, sort) |
24 | 24 | ||
25 | return this.authHttp.get<ResultList<AccountFollow>>(FollowService.BASE_APPLICATION_URL + '/following', { params }) | 25 | return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/following', { params }) |
26 | .pipe( | 26 | .pipe( |
27 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | 27 | map(res => this.restExtractor.convertResultListDateToHuman(res)), |
28 | catchError(res => this.restExtractor.handleError(res)) | 28 | catchError(res => this.restExtractor.handleError(res)) |
29 | ) | 29 | ) |
30 | } | 30 | } |
31 | 31 | ||
32 | getFollowers (pagination: RestPagination, sort: SortMeta): Observable<ResultList<AccountFollow>> { | 32 | getFollowers (pagination: RestPagination, sort: SortMeta): Observable<ResultList<ActorFollow>> { |
33 | let params = new HttpParams() | 33 | let params = new HttpParams() |
34 | params = this.restService.addRestGetParams(params, pagination, sort) | 34 | params = this.restService.addRestGetParams(params, pagination, sort) |
35 | 35 | ||
36 | return this.authHttp.get<ResultList<AccountFollow>>(FollowService.BASE_APPLICATION_URL + '/followers', { params }) | 36 | return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/followers', { params }) |
37 | .pipe( | 37 | .pipe( |
38 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | 38 | map(res => this.restExtractor.convertResultListDateToHuman(res)), |
39 | catchError(res => this.restExtractor.handleError(res)) | 39 | catchError(res => this.restExtractor.handleError(res)) |
@@ -52,7 +52,7 @@ export class FollowService { | |||
52 | ) | 52 | ) |
53 | } | 53 | } |
54 | 54 | ||
55 | unfollow (follow: AccountFollow) { | 55 | unfollow (follow: ActorFollow) { |
56 | return this.authHttp.delete(FollowService.BASE_APPLICATION_URL + '/following/' + follow.following.host) | 56 | return this.authHttp.delete(FollowService.BASE_APPLICATION_URL + '/following/' + follow.following.host) |
57 | .pipe( | 57 | .pipe( |
58 | map(this.restExtractor.extractDataBool), | 58 | map(this.restExtractor.extractDataBool), |