]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/videos.ts
Don't refresh videos when processing views
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / videos.ts
index c14184b35da7c4d3ebf94851445b52a380f5899d..a027c4840ef3861643b20ae6355170075fc3d197 100644 (file)
@@ -160,6 +160,9 @@ const videosCustomGetValidator = (
       if (areValidationErrors(req, res)) return
       if (!await doesVideoExist(req.params.id, res, fetchType)) return
 
+      // Controllers does not need to check video rights
+      if (fetchType === 'only-immutable-attributes') return next()
+
       const video = getVideoWithAttributes(res)
       const videoAll = video as MVideoFullLight