aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-16 15:02:48 +0100
committerChocobozzz <me@florianbigard.com>2018-11-16 15:49:16 +0100
commit8d4273463fb19d503b1aa0a32dc289f292ed614e (patch)
treef422773ecba3405bb5808bed8e25b62ac6b7ea08 /server/controllers/api/videos/index.ts
parent5776f78e3b3f3a371ec30c7fcb11e7ca17f2f65e (diff)
downloadPeerTube-8d4273463fb19d503b1aa0a32dc289f292ed614e.tar.gz
PeerTube-8d4273463fb19d503b1aa0a32dc289f292ed614e.tar.zst
PeerTube-8d4273463fb19d503b1aa0a32dc289f292ed614e.zip
Check follow constraints when getting a video
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index e654bdd09..89fd0432f 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -31,6 +31,7 @@ import {
31 asyncMiddleware, 31 asyncMiddleware,
32 asyncRetryTransactionMiddleware, 32 asyncRetryTransactionMiddleware,
33 authenticate, 33 authenticate,
34 checkVideoFollowConstraints,
34 commonVideosFiltersValidator, 35 commonVideosFiltersValidator,
35 optionalAuthenticate, 36 optionalAuthenticate,
36 paginationValidator, 37 paginationValidator,
@@ -123,6 +124,7 @@ videosRouter.get('/:id/description',
123videosRouter.get('/:id', 124videosRouter.get('/:id',
124 optionalAuthenticate, 125 optionalAuthenticate,
125 asyncMiddleware(videosGetValidator), 126 asyncMiddleware(videosGetValidator),
127 asyncMiddleware(checkVideoFollowConstraints),
126 getVideo 128 getVideo
127) 129)
128videosRouter.post('/:id/views', 130videosRouter.post('/:id/views',