diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-24 17:05:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-24 17:12:57 +0200 |
commit | 48dce1c90dff4e90a4bcffefaecf157336cf904b (patch) | |
tree | 478de23812d0bfd93f47e9ad6ad8888c9edcc235 /server/controllers/api/videos/index.ts | |
parent | 82e392f8a42a19815e932dd386e96e61ebe6d191 (diff) | |
download | PeerTube-48dce1c90dff4e90a4bcffefaecf157336cf904b.tar.gz PeerTube-48dce1c90dff4e90a4bcffefaecf157336cf904b.tar.zst PeerTube-48dce1c90dff4e90a4bcffefaecf157336cf904b.zip |
Update video channel routes
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 | } |