]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-rates.ts
store uploaded video filename (#4885)
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-rates.ts
index 923bf3eaf9fe02da1ede9e845015a9a71f020afd..1a973603464268429ad9dd9814033a1898035c88 100644 (file)
@@ -21,12 +21,7 @@ const videoUpdateRateValidator = [
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.id, res)) return
 
-    if (!await checkCanSeeVideoIfPrivate(req, res, res.locals.videoAll)) {
-      return res.fail({
-        status: HttpStatusCode.FORBIDDEN_403,
-        message: 'Cannot access to this ressource'
-      })
-    }
+    if (!await checkCanSeeVideoIfPrivate(req, res, res.locals.videoAll)) return
 
     return next()
   }