diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 10:35:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 10:35:15 +0100 |
commit | dae86118ed5d4026d04acb9d0e36829b9ad8eb4e (patch) | |
tree | a5bf9c4487240bf75a9b328cad459a0587f90dea /server/middlewares/validators/videos/video-shares.ts | |
parent | e65c0c5b1fab9c3d93f51721b2458cf5cf471f20 (diff) | |
download | PeerTube-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.ts | 3 |
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' | |||
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
7 | import { VideoShareModel } from '../../../models/video/video-share' | 7 | import { VideoShareModel } from '../../../models/video/video-share' |
8 | import { areValidationErrors } from '../utils' | 8 | import { areValidationErrors } from '../utils' |
9 | import { VideoModel } from '../../../models/video/video' | ||
10 | 9 | ||
11 | const videosShareValidator = [ | 10 | const 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) { |