aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-20 15:28:34 +0100
committerChocobozzz <me@florianbigard.com>2021-01-20 15:28:34 +0100
commita4d2ca071514b4838544f2fd7229d2e8cb9da0d4 (patch)
tree3fd3b95b38e3032197303d794d505ec9754b95e6 /server/models/video
parent70fdff3d4e140d19587e7ea9e40c021185b06a9a (diff)
downloadPeerTube-a4d2ca071514b4838544f2fd7229d2e8cb9da0d4.tar.gz
PeerTube-a4d2ca071514b4838544f2fd7229d2e8cb9da0d4.tar.zst
PeerTube-a4d2ca071514b4838544f2fd7229d2e8cb9da0d4.zip
Add user video list hooks
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts14
1 files changed, 8 insertions, 6 deletions
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 {
1004 return result.map(v => v.id) 1004 return result.map(v => v.id)
1005 } 1005 }
1006 1006
1007 static listUserVideosForApi ( 1007 static listUserVideosForApi (options: {
1008 accountId: number, 1008 accountId: number
1009 start: number, 1009 start: number
1010 count: number, 1010 count: number
1011 sort: string, 1011 sort: string
1012 search?: string 1012 search?: string
1013 ) { 1013 }) {
1014 const { accountId, start, count, sort, search } = options
1015
1014 function buildBaseQuery (): FindOptions { 1016 function buildBaseQuery (): FindOptions {
1015 let baseQuery = { 1017 let baseQuery = {
1016 offset: start, 1018 offset: start,