mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Prevent caption listing of private videos
This commit is contained in:
parent
7b54a81ccc
commit
795212f7ac
6 changed files with 86 additions and 22 deletions
|
@ -48,7 +48,7 @@ export {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function listVideoCaptions (req: express.Request, res: express.Response) {
|
||||
const data = await VideoCaptionModel.listVideoCaptions(res.locals.videoId.id)
|
||||
const data = await VideoCaptionModel.listVideoCaptions(res.locals.onlyVideo.id)
|
||||
|
||||
return res.json(getFormattedObjects(data, data.length))
|
||||
}
|
||||
|
|
|
@ -10,13 +10,15 @@ import {
|
|||
ensureUserHasRight,
|
||||
videoFileMetadataGetValidator,
|
||||
videoFilesDeleteHLSValidator,
|
||||
videoFilesDeleteWebTorrentValidator
|
||||
videoFilesDeleteWebTorrentValidator,
|
||||
videosGetValidator
|
||||
} from '../../../middlewares'
|
||||
|
||||
const lTags = loggerTagsFactory('api', 'video')
|
||||
const filesRouter = express.Router()
|
||||
|
||||
filesRouter.get('/:id/metadata/:videoFileId',
|
||||
asyncMiddleware(videosGetValidator),
|
||||
asyncMiddleware(videoFileMetadataGetValidator),
|
||||
asyncMiddleware(getVideoFileMetadata)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue