aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos/video-shares.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 10:35:15 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 10:35:15 +0100
commitdae86118ed5d4026d04acb9d0e36829b9ad8eb4e (patch)
treea5bf9c4487240bf75a9b328cad459a0587f90dea /server/middlewares/validators/videos/video-shares.ts
parente65c0c5b1fab9c3d93f51721b2458cf5cf471f20 (diff)
downloadPeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.tar.gz
PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.tar.zst
PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.zip
Cleanup express locals typings
Diffstat (limited to 'server/middlewares/validators/videos/video-shares.ts')
-rw-r--r--server/middlewares/validators/videos/video-shares.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-shares.ts b/server/middlewares/validators/videos/video-shares.ts
index f4514f85c..d5cbdb03e 100644
--- a/server/middlewares/validators/videos/video-shares.ts
+++ b/server/middlewares/validators/videos/video-shares.ts
@@ -6,7 +6,6 @@ import { doesVideoExist } from '../../../helpers/custom-validators/videos'
6import { logger } from '../../../helpers/logger' 6import { logger } from '../../../helpers/logger'
7import { VideoShareModel } from '../../../models/video/video-share' 7import { VideoShareModel } from '../../../models/video/video-share'
8import { areValidationErrors } from '../utils' 8import { areValidationErrors } from '../utils'
9import { VideoModel } from '../../../models/video/video'
10 9
11const videosShareValidator = [ 10const videosShareValidator = [
12 param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), 11 param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'),
@@ -18,7 +17,7 @@ const videosShareValidator = [
18 if (areValidationErrors(req, res)) return 17 if (areValidationErrors(req, res)) return
19 if (!await doesVideoExist(req.params.id, res)) return 18 if (!await doesVideoExist(req.params.id, res)) return
20 19
21 const video: VideoModel = res.locals.video 20 const video = res.locals.video
22 21
23 const share = await VideoShareModel.load(req.params.actorId, video.id) 22 const share = await VideoShareModel.load(req.params.actorId, video.id)
24 if (!share) { 23 if (!share) {