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 --- server/models/account/user-video-history.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/models/account') 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 { }) User: UserModel - static listForApi (user: MUserAccountId, start: number, count: number) { + static listForApi (user: MUserAccountId, start: number, count: number, search?: string) { return VideoModel.listForApi({ start, count, + search, sort: '-"userVideoHistory"."updatedAt"', nsfw: null, // All includeLocalVideos: true, -- cgit v1.2.3