diff options
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 61b6c5826..4b3198a74 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -42,7 +42,6 @@ import { VideoModel } from '../../../models/video/video' | |||
42 | import { VideoFileModel } from '../../../models/video/video-file' | 42 | import { VideoFileModel } from '../../../models/video/video-file' |
43 | import { abuseVideoRouter } from './abuse' | 43 | import { abuseVideoRouter } from './abuse' |
44 | import { blacklistRouter } from './blacklist' | 44 | import { blacklistRouter } from './blacklist' |
45 | import { videoChannelRouter } from './channel' | ||
46 | import { videoCommentRouter } from './comment' | 45 | import { videoCommentRouter } from './comment' |
47 | import { rateVideoRouter } from './rate' | 46 | import { rateVideoRouter } from './rate' |
48 | import { VideoFilter } from '../../../../shared/models/videos/video-query.type' | 47 | import { VideoFilter } from '../../../../shared/models/videos/video-query.type' |
@@ -72,7 +71,6 @@ const reqVideoFileUpdate = createReqFiles( | |||
72 | videosRouter.use('/', abuseVideoRouter) | 71 | videosRouter.use('/', abuseVideoRouter) |
73 | videosRouter.use('/', blacklistRouter) | 72 | videosRouter.use('/', blacklistRouter) |
74 | videosRouter.use('/', rateVideoRouter) | 73 | videosRouter.use('/', rateVideoRouter) |
75 | videosRouter.use('/', videoChannelRouter) | ||
76 | videosRouter.use('/', videoCommentRouter) | 74 | videosRouter.use('/', videoCommentRouter) |
77 | 75 | ||
78 | videosRouter.get('/categories', listVideoCategories) | 76 | videosRouter.get('/categories', listVideoCategories) |
@@ -397,13 +395,14 @@ async function getVideoDescription (req: express.Request, res: express.Response) | |||
397 | } | 395 | } |
398 | 396 | ||
399 | async function listVideos (req: express.Request, res: express.Response, next: express.NextFunction) { | 397 | async function listVideos (req: express.Request, res: express.Response, next: express.NextFunction) { |
400 | const resultList = await VideoModel.listForApi( | 398 | const resultList = await VideoModel.listForApi({ |
401 | req.query.start as number, | 399 | start: req.query.start, |
402 | req.query.count as number, | 400 | count: req.query.count, |
403 | req.query.sort as VideoSortField, | 401 | sort: req.query.sort, |
404 | isNSFWHidden(res), | 402 | hideNSFW: isNSFWHidden(res), |
405 | req.query.filter as VideoFilter | 403 | filter: req.query.filter as VideoFilter, |
406 | ) | 404 | withFiles: false |
405 | }) | ||
407 | 406 | ||
408 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 407 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |
409 | } | 408 | } |