]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-shares.ts
Add ability to unpublish video/playlist
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-shares.ts
index f4514f85cb35abe75d51e1b6187af5839783b3f6..d5cbdb03ef2ae64eccfdc821f6d844e4bbc03a79 100644 (file)
@@ -6,7 +6,6 @@ import { doesVideoExist } from '../../../helpers/custom-validators/videos'
 import { logger } from '../../../helpers/logger'
 import { VideoShareModel } from '../../../models/video/video-share'
 import { areValidationErrors } from '../utils'
-import { VideoModel } from '../../../models/video/video'
 
 const videosShareValidator = [
   param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'),
@@ -18,7 +17,7 @@ const videosShareValidator = [
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.id, res)) return
 
-    const video: VideoModel = res.locals.video
+    const video = res.locals.video
 
     const share = await VideoShareModel.load(req.params.actorId, video.id)
     if (!share) {