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 /server/models/account/user-video-history.ts | |
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 'server/models/account/user-video-history.ts')
-rw-r--r-- | server/models/account/user-video-history.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/account/user-video-history.ts b/server/models/account/user-video-history.ts index 45171fc60..6be1d65ea 100644 --- a/server/models/account/user-video-history.ts +++ b/server/models/account/user-video-history.ts | |||
@@ -55,10 +55,11 @@ export class UserVideoHistoryModel extends Model { | |||
55 | }) | 55 | }) |
56 | User: UserModel | 56 | User: UserModel |
57 | 57 | ||
58 | static listForApi (user: MUserAccountId, start: number, count: number) { | 58 | static listForApi (user: MUserAccountId, start: number, count: number, search?: string) { |
59 | return VideoModel.listForApi({ | 59 | return VideoModel.listForApi({ |
60 | start, | 60 | start, |
61 | count, | 61 | count, |
62 | search, | ||
62 | sort: '-"userVideoHistory"."updatedAt"', | 63 | sort: '-"userVideoHistory"."updatedAt"', |
63 | nsfw: null, // All | 64 | nsfw: null, // All |
64 | includeLocalVideos: true, | 65 | includeLocalVideos: true, |