aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts16
1 files changed, 3 insertions, 13 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 520d8cbbb..3cdd42289 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -26,7 +26,6 @@ import {
26 setDefaultVideosSort, 26 setDefaultVideosSort,
27 videosCustomGetValidator, 27 videosCustomGetValidator,
28 videosGetValidator, 28 videosGetValidator,
29 videoSourceGetValidator,
30 videosRemoveValidator, 29 videosRemoveValidator,
31 videosSortValidator 30 videosSortValidator
32} from '../../../middlewares' 31} from '../../../middlewares'
@@ -39,7 +38,9 @@ import { filesRouter } from './files'
39import { videoImportsRouter } from './import' 38import { videoImportsRouter } from './import'
40import { liveRouter } from './live' 39import { liveRouter } from './live'
41import { ownershipVideoRouter } from './ownership' 40import { ownershipVideoRouter } from './ownership'
41import { videoPasswordRouter } from './passwords'
42import { rateVideoRouter } from './rate' 42import { rateVideoRouter } from './rate'
43import { videoSourceRouter } from './source'
43import { statsRouter } from './stats' 44import { statsRouter } from './stats'
44import { storyboardRouter } from './storyboard' 45import { storyboardRouter } from './storyboard'
45import { studioRouter } from './studio' 46import { studioRouter } from './studio'
@@ -48,7 +49,6 @@ import { transcodingRouter } from './transcoding'
48import { updateRouter } from './update' 49import { updateRouter } from './update'
49import { uploadRouter } from './upload' 50import { uploadRouter } from './upload'
50import { viewRouter } from './view' 51import { viewRouter } from './view'
51import { videoPasswordRouter } from './passwords'
52 52
53const auditLogger = auditLoggerFactory('videos') 53const auditLogger = auditLoggerFactory('videos')
54const videosRouter = express.Router() 54const videosRouter = express.Router()
@@ -72,6 +72,7 @@ videosRouter.use('/', transcodingRouter)
72videosRouter.use('/', tokenRouter) 72videosRouter.use('/', tokenRouter)
73videosRouter.use('/', videoPasswordRouter) 73videosRouter.use('/', videoPasswordRouter)
74videosRouter.use('/', storyboardRouter) 74videosRouter.use('/', storyboardRouter)
75videosRouter.use('/', videoSourceRouter)
75 76
76videosRouter.get('/categories', 77videosRouter.get('/categories',
77 openapiOperationDoc({ operationId: 'getCategories' }), 78 openapiOperationDoc({ operationId: 'getCategories' }),
@@ -108,13 +109,6 @@ videosRouter.get('/:id/description',
108 asyncMiddleware(getVideoDescription) 109 asyncMiddleware(getVideoDescription)
109) 110)
110 111
111videosRouter.get('/:id/source',
112 openapiOperationDoc({ operationId: 'getVideoSource' }),
113 authenticate,
114 asyncMiddleware(videoSourceGetValidator),
115 getVideoSource
116)
117
118videosRouter.get('/:id', 112videosRouter.get('/:id',
119 openapiOperationDoc({ operationId: 'getVideo' }), 113 openapiOperationDoc({ operationId: 'getVideo' }),
120 optionalAuthenticate, 114 optionalAuthenticate,
@@ -177,10 +171,6 @@ async function getVideoDescription (req: express.Request, res: express.Response)
177 return res.json({ description }) 171 return res.json({ description })
178} 172}
179 173
180function getVideoSource (req: express.Request, res: express.Response) {
181 return res.json(res.locals.videoSource.toFormattedJSON())
182}
183
184async function listVideos (req: express.Request, res: express.Response) { 174async function listVideos (req: express.Request, res: express.Response) {
185 const serverActor = await getServerActor() 175 const serverActor = await getServerActor()
186 176