diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-01-13 09:16:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 09:16:15 +0100 |
commit | d8b34ee55b654912f86bb8b472d391ced8c28f64 (patch) | |
tree | efa2b8ac36c00fa6e9b5af3f13e54a47bc7a7701 /client/src/app/shared/shared-main | |
parent | 22078471fbe5a4dea6177bd1fa19da1cf887679e (diff) | |
download | PeerTube-d8b34ee55b654912f86bb8b472d391ced8c28f64.tar.gz PeerTube-d8b34ee55b654912f86bb8b472d391ced8c28f64.tar.zst PeerTube-d8b34ee55b654912f86bb8b472d391ced8c28f64.zip |
Allow user to search through their watch history (#3576)
* allow user to search through their watch history
* add tests for search in watch history
* Update client/src/app/shared/shared-main/users/user-history.service.ts
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/users/user-history.service.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-main/users/user-history.service.ts b/client/src/app/shared/shared-main/users/user-history.service.ts index 43970dc5b..bb87dcba8 100644 --- a/client/src/app/shared/shared-main/users/user-history.service.ts +++ b/client/src/app/shared/shared-main/users/user-history.service.ts | |||
@@ -18,11 +18,12 @@ export class UserHistoryService { | |||
18 | private videoService: VideoService | 18 | private videoService: VideoService |
19 | ) {} | 19 | ) {} |
20 | 20 | ||
21 | getUserVideosHistory (historyPagination: ComponentPaginationLight) { | 21 | getUserVideosHistory (historyPagination: ComponentPaginationLight, search?: string) { |
22 | const pagination = this.restService.componentPaginationToRestPagination(historyPagination) | 22 | const pagination = this.restService.componentPaginationToRestPagination(historyPagination) |
23 | 23 | ||
24 | let params = new HttpParams() | 24 | let params = new HttpParams() |
25 | params = this.restService.addRestGetParams(params, pagination) | 25 | params = this.restService.addRestGetParams(params, pagination) |
26 | params = params.append('search', search) | ||
26 | 27 | ||
27 | return this.authHttp | 28 | return this.authHttp |
28 | .get<ResultList<Video>>(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL, { params }) | 29 | .get<ResultList<Video>>(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL, { params }) |