X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fvideos%2Fvideo-shares.ts;h=20fc962438f591f97c8bb07e62f236b67c6bc44a;hb=adc1f09c0dbd997f34028c1c82d1c118dc8ead80;hp=6f4a1f3e064f311c27bec5749bdee6ef26fa6cd3;hpb=3e753302d8c911b59971c16a8018df0e1ab78465;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/videos/video-shares.ts b/server/middlewares/validators/videos/video-shares.ts index 6f4a1f3e0..20fc96243 100644 --- a/server/middlewares/validators/videos/video-shares.ts +++ b/server/middlewares/validators/videos/video-shares.ts @@ -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) {