diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-captions.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-captions.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts index 441c6b4be..dfb8fefc5 100644 --- a/server/middlewares/validators/videos/video-captions.ts +++ b/server/middlewares/validators/videos/video-captions.ts | |||
@@ -7,7 +7,7 @@ import { logger } from '../../../helpers/logger' | |||
7 | import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../../initializers/constants' | 7 | import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../../initializers/constants' |
8 | import { | 8 | import { |
9 | areValidationErrors, | 9 | areValidationErrors, |
10 | checkCanSeeVideoIfPrivate, | 10 | checkCanSeeVideo, |
11 | checkUserCanManageVideo, | 11 | checkUserCanManageVideo, |
12 | doesVideoCaptionExist, | 12 | doesVideoCaptionExist, |
13 | doesVideoExist, | 13 | doesVideoExist, |
@@ -74,7 +74,7 @@ const listVideoCaptionsValidator = [ | |||
74 | if (!await doesVideoExist(req.params.videoId, res, 'only-video')) return | 74 | if (!await doesVideoExist(req.params.videoId, res, 'only-video')) return |
75 | 75 | ||
76 | const video = res.locals.onlyVideo | 76 | const video = res.locals.onlyVideo |
77 | if (!await checkCanSeeVideoIfPrivate(req, res, video)) return | 77 | if (!await checkCanSeeVideo({ req, res, video, paramId: req.params.videoId })) return |
78 | 78 | ||
79 | return next() | 79 | return next() |
80 | } | 80 | } |