aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-13 09:16:15 +0100
committerGitHub <noreply@github.com>2021-01-13 09:16:15 +0100
commitd8b34ee55b654912f86bb8b472d391ced8c28f64 (patch)
treeefa2b8ac36c00fa6e9b5af3f13e54a47bc7a7701 /shared
parent22078471fbe5a4dea6177bd1fa19da1cf887679e (diff)
downloadPeerTube-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 'shared')
-rw-r--r--shared/extra-utils/videos/video-history.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/extra-utils/videos/video-history.ts b/shared/extra-utils/videos/video-history.ts
index 0dd3afb24..b989e14dc 100644
--- a/shared/extra-utils/videos/video-history.ts
+++ b/shared/extra-utils/videos/video-history.ts
@@ -14,13 +14,16 @@ function userWatchVideo (
14 return makePutBodyRequest({ url, path, token, fields, statusCodeExpected }) 14 return makePutBodyRequest({ url, path, token, fields, statusCodeExpected })
15} 15}
16 16
17function listMyVideosHistory (url: string, token: string) { 17function listMyVideosHistory (url: string, token: string, search?: string) {
18 const path = '/api/v1/users/me/history/videos' 18 const path = '/api/v1/users/me/history/videos'
19 19
20 return makeGetRequest({ 20 return makeGetRequest({
21 url, 21 url,
22 path, 22 path,
23 token, 23 token,
24 query: {
25 search
26 },
24 statusCodeExpected: HttpStatusCode.OK_200 27 statusCodeExpected: HttpStatusCode.OK_200
25 }) 28 })
26} 29}