diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-06 13:31:37 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-06 13:31:37 +0100 |
commit | c3edc5b074aa4bb1861ed0a94d3713808e87170f (patch) | |
tree | 328af78334a13d0d20ca53b0d88c13128e0f1244 /server/controllers | |
parent | 75b7117f078461d2507572ba9da6527894e1b734 (diff) | |
parent | 795212f7acc690c88c86d0fab8772f6564d59cb8 (diff) | |
download | PeerTube-c3edc5b074aa4bb1861ed0a94d3713808e87170f.tar.gz PeerTube-c3edc5b074aa4bb1861ed0a94d3713808e87170f.tar.zst PeerTube-c3edc5b074aa4bb1861ed0a94d3713808e87170f.zip |
Merge branch 'release/4.0.0' into develop
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/videos/captions.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/files.ts | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts index c0e60848b..2a9a9d233 100644 --- a/server/controllers/api/videos/captions.ts +++ b/server/controllers/api/videos/captions.ts | |||
@@ -49,7 +49,7 @@ export { | |||
49 | // --------------------------------------------------------------------------- | 49 | // --------------------------------------------------------------------------- |
50 | 50 | ||
51 | async function listVideoCaptions (req: express.Request, res: express.Response) { | 51 | async function listVideoCaptions (req: express.Request, res: express.Response) { |
52 | const data = await VideoCaptionModel.listVideoCaptions(res.locals.videoId.id) | 52 | const data = await VideoCaptionModel.listVideoCaptions(res.locals.onlyVideo.id) |
53 | 53 | ||
54 | return res.json(getFormattedObjects(data, data.length)) | 54 | return res.json(getFormattedObjects(data, data.length)) |
55 | } | 55 | } |
diff --git a/server/controllers/api/videos/files.ts b/server/controllers/api/videos/files.ts index a8b32411d..0fbda280e 100644 --- a/server/controllers/api/videos/files.ts +++ b/server/controllers/api/videos/files.ts | |||
@@ -10,13 +10,15 @@ import { | |||
10 | ensureUserHasRight, | 10 | ensureUserHasRight, |
11 | videoFileMetadataGetValidator, | 11 | videoFileMetadataGetValidator, |
12 | videoFilesDeleteHLSValidator, | 12 | videoFilesDeleteHLSValidator, |
13 | videoFilesDeleteWebTorrentValidator | 13 | videoFilesDeleteWebTorrentValidator, |
14 | videosGetValidator | ||
14 | } from '../../../middlewares' | 15 | } from '../../../middlewares' |
15 | 16 | ||
16 | const lTags = loggerTagsFactory('api', 'video') | 17 | const lTags = loggerTagsFactory('api', 'video') |
17 | const filesRouter = express.Router() | 18 | const filesRouter = express.Router() |
18 | 19 | ||
19 | filesRouter.get('/:id/metadata/:videoFileId', | 20 | filesRouter.get('/:id/metadata/:videoFileId', |
21 | asyncMiddleware(videosGetValidator), | ||
20 | asyncMiddleware(videoFileMetadataGetValidator), | 22 | asyncMiddleware(videoFileMetadataGetValidator), |
21 | asyncMiddleware(getVideoFileMetadata) | 23 | asyncMiddleware(getVideoFileMetadata) |
22 | ) | 24 | ) |