diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-16 15:02:48 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-16 15:49:16 +0100 |
commit | 8d4273463fb19d503b1aa0a32dc289f292ed614e (patch) | |
tree | f422773ecba3405bb5808bed8e25b62ac6b7ea08 /server/controllers | |
parent | 5776f78e3b3f3a371ec30c7fcb11e7ca17f2f65e (diff) | |
download | PeerTube-8d4273463fb19d503b1aa0a32dc289f292ed614e.tar.gz PeerTube-8d4273463fb19d503b1aa0a32dc289f292ed614e.tar.zst PeerTube-8d4273463fb19d503b1aa0a32dc289f292ed614e.zip |
Check follow constraints when getting a video
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 |
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', | |||
123 | videosRouter.get('/:id', | 124 | videosRouter.get('/:id', |
124 | optionalAuthenticate, | 125 | optionalAuthenticate, |
125 | asyncMiddleware(videosGetValidator), | 126 | asyncMiddleware(videosGetValidator), |
127 | asyncMiddleware(checkVideoFollowConstraints), | ||
126 | getVideo | 128 | getVideo |
127 | ) | 129 | ) |
128 | videosRouter.post('/:id/views', | 130 | videosRouter.post('/:id/views', |