aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos/videos.ts')
-rw-r--r--server/middlewares/validators/videos/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index a707fd086..2bed5f181 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -4,7 +4,7 @@ import { getResumableUploadPath } from '@server/helpers/upload'
4import { isAbleToUploadVideo } from '@server/lib/user' 4import { isAbleToUploadVideo } from '@server/lib/user'
5import { getServerActor } from '@server/models/application/application' 5import { getServerActor } from '@server/models/application/application'
6import { ExpressPromiseHandler } from '@server/types/express' 6import { ExpressPromiseHandler } from '@server/types/express'
7import { MUserAccountId, MVideoWithRights } from '@server/types/models' 7import { MUserAccountId, MVideoFullLight } from '@server/types/models'
8import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared' 8import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared'
9import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' 9import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
10import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/change-ownership/video-change-ownership-accept.model' 10import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/change-ownership/video-change-ownership-accept.model'
@@ -258,7 +258,7 @@ async function checkVideoFollowConstraints (req: express.Request, res: express.R
258} 258}
259 259
260const videosCustomGetValidator = ( 260const videosCustomGetValidator = (
261 fetchType: 'for-api' | 'all' | 'only-video' | 'only-video-with-rights' | 'only-immutable-attributes', 261 fetchType: 'for-api' | 'all' | 'only-video' | 'only-immutable-attributes',
262 authenticateInQuery = false 262 authenticateInQuery = false
263) => { 263) => {
264 return [ 264 return [
@@ -273,7 +273,7 @@ const videosCustomGetValidator = (
273 // Controllers does not need to check video rights 273 // Controllers does not need to check video rights
274 if (fetchType === 'only-immutable-attributes') return next() 274 if (fetchType === 'only-immutable-attributes') return next()
275 275
276 const video = getVideoWithAttributes(res) as MVideoWithRights 276 const video = getVideoWithAttributes(res) as MVideoFullLight
277 277
278 // Video private or blacklisted 278 // Video private or blacklisted
279 if (video.requiresAuth()) { 279 if (video.requiresAuth()) {