From a4d2ca071514b4838544f2fd7229d2e8cb9da0d4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 Jan 2021 15:28:34 +0100 Subject: Add user video list hooks --- server/models/video/video.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 5027e980d..3db6549ae 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1004,13 +1004,15 @@ export class VideoModel extends Model { return result.map(v => v.id) } - static listUserVideosForApi ( - accountId: number, - start: number, - count: number, - sort: string, + static listUserVideosForApi (options: { + accountId: number + start: number + count: number + sort: string search?: string - ) { + }) { + const { accountId, start, count, sort, search } = options + function buildBaseQuery (): FindOptions { let baseQuery = { offset: start, -- cgit v1.2.3