]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-abuses.ts
Stronger model typings
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-abuses.ts
index e27d91bb12cb4e3820de54d3e6b6f78e6fe8b448..a4aef4024a8d9e470cbe1c3f0163df9bd1e0d699 100644 (file)
@@ -33,7 +33,7 @@ const videoAbuseGetValidator = [
 
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.videoId, res)) return
-    if (!await doesVideoAbuseExist(req.params.id, res.locals.video.id, res)) return
+    if (!await doesVideoAbuseExist(req.params.id, res.locals.videoAll.id, res)) return
 
     return next()
   }
@@ -54,7 +54,7 @@ const videoAbuseUpdateValidator = [
 
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.videoId, res)) return
-    if (!await doesVideoAbuseExist(req.params.id, res.locals.video.id, res)) return
+    if (!await doesVideoAbuseExist(req.params.id, res.locals.videoAll.id, res)) return
 
     return next()
   }