aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/videos.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index 9875c68bd..714f7ac95 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -154,7 +154,9 @@ function checkUserCanManageVideo (user: UserModel, video: VideoModel, right: Use
154} 154}
155 155
156async function isVideoExist (id: string, res: Response, fetchType: VideoFetchType = 'all') { 156async function isVideoExist (id: string, res: Response, fetchType: VideoFetchType = 'all') {
157 const video = await fetchVideo(id, fetchType) 157 const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined
158
159 const video = await fetchVideo(id, fetchType, userId)
158 160
159 if (video === null) { 161 if (video === null) {
160 res.status(404) 162 res.status(404)