From d8b34ee55b654912f86bb8b472d391ced8c28f64 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 13 Jan 2021 09:16:15 +0100 Subject: 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 --- shared/extra-utils/videos/video-history.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shared') 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 ( return makePutBodyRequest({ url, path, token, fields, statusCodeExpected }) } -function listMyVideosHistory (url: string, token: string) { +function listMyVideosHistory (url: string, token: string, search?: string) { const path = '/api/v1/users/me/history/videos' return makeGetRequest({ url, path, token, + query: { + search + }, statusCodeExpected: HttpStatusCode.OK_200 }) } -- cgit v1.2.3