diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-08 15:51:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-08 15:55:32 +0200 |
commit | 24b9417cec5cc785a57b2fe169a1ae88b88801a4 (patch) | |
tree | 42adf8fb4355c96fe2585ebd6312563e8182d682 /client/src/app/shared/users | |
parent | 791645e620fb98c6e7c32271d91d91ff7e41b892 (diff) | |
download | PeerTube-24b9417cec5cc785a57b2fe169a1ae88b88801a4.tar.gz PeerTube-24b9417cec5cc785a57b2fe169a1ae88b88801a4.tar.zst PeerTube-24b9417cec5cc785a57b2fe169a1ae88b88801a4.zip |
Add users search filter
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r-- | client/src/app/shared/users/user.service.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts index 0eb3870b0..27a81f0a2 100644 --- a/client/src/app/shared/users/user.service.ts +++ b/client/src/app/shared/users/user.service.ts | |||
@@ -158,10 +158,12 @@ export class UserService { | |||
158 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 158 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
159 | } | 159 | } |
160 | 160 | ||
161 | getUsers (pagination: RestPagination, sort: SortMeta): Observable<ResultList<User>> { | 161 | getUsers (pagination: RestPagination, sort: SortMeta, search?: string): Observable<ResultList<User>> { |
162 | let params = new HttpParams() | 162 | let params = new HttpParams() |
163 | params = this.restService.addRestGetParams(params, pagination, sort) | 163 | params = this.restService.addRestGetParams(params, pagination, sort) |
164 | 164 | ||
165 | if (search) params = params.append('search', search) | ||
166 | |||
165 | return this.authHttp.get<ResultList<User>>(UserService.BASE_USERS_URL, { params }) | 167 | return this.authHttp.get<ResultList<User>>(UserService.BASE_USERS_URL, { params }) |
166 | .pipe( | 168 | .pipe( |
167 | map(res => this.restExtractor.convertResultListDateToHuman(res)), | 169 | map(res => this.restExtractor.convertResultListDateToHuman(res)), |