aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-10 09:43:53 +0200
committerChocobozzz <me@florianbigard.com>2018-10-10 09:43:53 +0200
commitb014b6b9c7cb68d09c52b44046afe486c0736426 (patch)
treedcc10748eac50400d670e9fa0163f73b96f6194a /client/src/app/+admin/follows/shared
parent9ccff23877ec8d740fcd5a9254fcd2424b62d2c8 (diff)
downloadPeerTube-b014b6b9c7cb68d09c52b44046afe486c0736426.tar.gz
PeerTube-b014b6b9c7cb68d09c52b44046afe486c0736426.tar.zst
PeerTube-b014b6b9c7cb68d09c52b44046afe486c0736426.zip
Add ability to search on followers/following
Diffstat (limited to 'client/src/app/+admin/follows/shared')
-rw-r--r--client/src/app/+admin/follows/shared/follow.service.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts
index 27169a9cd..a2904179e 100644
--- a/client/src/app/+admin/follows/shared/follow.service.ts
+++ b/client/src/app/+admin/follows/shared/follow.service.ts
@@ -18,10 +18,12 @@ export class FollowService {
18 ) { 18 ) {
19 } 19 }
20 20
21 getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<ActorFollow>> { 21 getFollowing (pagination: RestPagination, sort: SortMeta, search?: string): 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 if (search) params = params.append('search', search)
26
25 return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/following', { params }) 27 return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/following', { params })
26 .pipe( 28 .pipe(
27 map(res => this.restExtractor.convertResultListDateToHuman(res)), 29 map(res => this.restExtractor.convertResultListDateToHuman(res)),
@@ -29,10 +31,12 @@ export class FollowService {
29 ) 31 )
30 } 32 }
31 33
32 getFollowers (pagination: RestPagination, sort: SortMeta): Observable<ResultList<ActorFollow>> { 34 getFollowers (pagination: RestPagination, sort: SortMeta, search?: string): Observable<ResultList<ActorFollow>> {
33 let params = new HttpParams() 35 let params = new HttpParams()
34 params = this.restService.addRestGetParams(params, pagination, sort) 36 params = this.restService.addRestGetParams(params, pagination, sort)
35 37
38 if (search) params = params.append('search', search)
39
36 return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/followers', { params }) 40 return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/followers', { params })
37 .pipe( 41 .pipe(
38 map(res => this.restExtractor.convertResultListDateToHuman(res)), 42 map(res => this.restExtractor.convertResultListDateToHuman(res)),