aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index abf823d4b..5027e980d 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1087,6 +1087,7 @@ export class VideoModel extends Model {
1087 user?: MUserAccountId 1087 user?: MUserAccountId
1088 historyOfUser?: MUserId 1088 historyOfUser?: MUserId
1089 countVideos?: boolean 1089 countVideos?: boolean
1090 search?: string
1090 }) { 1091 }) {
1091 if ((options.filter === 'all-local' || options.filter === 'all') && !options.user.hasRight(UserRight.SEE_ALL_VIDEOS)) { 1092 if ((options.filter === 'all-local' || options.filter === 'all') && !options.user.hasRight(UserRight.SEE_ALL_VIDEOS)) {
1092 throw new Error('Try to filter all-local but no user has not the see all videos right') 1093 throw new Error('Try to filter all-local but no user has not the see all videos right')
@@ -1123,7 +1124,8 @@ export class VideoModel extends Model {
1123 includeLocalVideos: options.includeLocalVideos, 1124 includeLocalVideos: options.includeLocalVideos,
1124 user: options.user, 1125 user: options.user,
1125 historyOfUser: options.historyOfUser, 1126 historyOfUser: options.historyOfUser,
1126 trendingDays 1127 trendingDays,
1128 search: options.search
1127 } 1129 }
1128 1130
1129 return VideoModel.getAvailableForApi(queryOptions, options.countVideos) 1131 return VideoModel.getAvailableForApi(queryOptions, options.countVideos)