]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-shares.ts
Increase video comments limit
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-shares.ts
index 6f4a1f3e064f311c27bec5749bdee6ef26fa6cd3..20fc962438f591f97c8bb07e62f236b67c6bc44a 100644 (file)
@@ -1,6 +1,5 @@
 import * as express from 'express'
-import 'express-validator'
-import { param } from 'express-validator/check'
+import { param } from 'express-validator'
 import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc'
 import { logger } from '../../../helpers/logger'
 import { VideoShareModel } from '../../../models/video/video-share'
@@ -17,7 +16,7 @@ const videosShareValidator = [
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.id, res)) return
 
-    const video = res.locals.video
+    const video = res.locals.videoAll
 
     const share = await VideoShareModel.load(req.params.actorId, video.id)
     if (!share) {