diff options
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 16 |
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' | |||
39 | import { videoImportsRouter } from './import' | 38 | import { videoImportsRouter } from './import' |
40 | import { liveRouter } from './live' | 39 | import { liveRouter } from './live' |
41 | import { ownershipVideoRouter } from './ownership' | 40 | import { ownershipVideoRouter } from './ownership' |
41 | import { videoPasswordRouter } from './passwords' | ||
42 | import { rateVideoRouter } from './rate' | 42 | import { rateVideoRouter } from './rate' |
43 | import { videoSourceRouter } from './source' | ||
43 | import { statsRouter } from './stats' | 44 | import { statsRouter } from './stats' |
44 | import { storyboardRouter } from './storyboard' | 45 | import { storyboardRouter } from './storyboard' |
45 | import { studioRouter } from './studio' | 46 | import { studioRouter } from './studio' |
@@ -48,7 +49,6 @@ import { transcodingRouter } from './transcoding' | |||
48 | import { updateRouter } from './update' | 49 | import { updateRouter } from './update' |
49 | import { uploadRouter } from './upload' | 50 | import { uploadRouter } from './upload' |
50 | import { viewRouter } from './view' | 51 | import { viewRouter } from './view' |
51 | import { videoPasswordRouter } from './passwords' | ||
52 | 52 | ||
53 | const auditLogger = auditLoggerFactory('videos') | 53 | const auditLogger = auditLoggerFactory('videos') |
54 | const videosRouter = express.Router() | 54 | const videosRouter = express.Router() |
@@ -72,6 +72,7 @@ videosRouter.use('/', transcodingRouter) | |||
72 | videosRouter.use('/', tokenRouter) | 72 | videosRouter.use('/', tokenRouter) |
73 | videosRouter.use('/', videoPasswordRouter) | 73 | videosRouter.use('/', videoPasswordRouter) |
74 | videosRouter.use('/', storyboardRouter) | 74 | videosRouter.use('/', storyboardRouter) |
75 | videosRouter.use('/', videoSourceRouter) | ||
75 | 76 | ||
76 | videosRouter.get('/categories', | 77 | videosRouter.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 | ||
111 | videosRouter.get('/:id/source', | ||
112 | openapiOperationDoc({ operationId: 'getVideoSource' }), | ||
113 | authenticate, | ||
114 | asyncMiddleware(videoSourceGetValidator), | ||
115 | getVideoSource | ||
116 | ) | ||
117 | |||
118 | videosRouter.get('/:id', | 112 | videosRouter.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 | ||
180 | function getVideoSource (req: express.Request, res: express.Response) { | ||
181 | return res.json(res.locals.videoSource.toFormattedJSON()) | ||
182 | } | ||
183 | |||
184 | async function listVideos (req: express.Request, res: express.Response) { | 174 | async function listVideos (req: express.Request, res: express.Response) { |
185 | const serverActor = await getServerActor() | 175 | const serverActor = await getServerActor() |
186 | 176 | ||