diff options
Diffstat (limited to 'server/controllers/api/video-channel.ts')
-rw-r--r-- | server/controllers/api/video-channel.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 1707732ee..0488ba8f5 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -3,7 +3,7 @@ import { getFormattedObjects, resetSequelizeInstance } from '../../helpers/utils | |||
3 | import { | 3 | import { |
4 | asyncMiddleware, | 4 | asyncMiddleware, |
5 | asyncRetryTransactionMiddleware, | 5 | asyncRetryTransactionMiddleware, |
6 | authenticate, | 6 | authenticate, commonVideosFiltersValidator, |
7 | optionalAuthenticate, | 7 | optionalAuthenticate, |
8 | paginationValidator, | 8 | paginationValidator, |
9 | setDefaultPagination, | 9 | setDefaultPagination, |
@@ -19,7 +19,7 @@ import { videosSortValidator } from '../../middlewares/validators' | |||
19 | import { sendUpdateActor } from '../../lib/activitypub/send' | 19 | import { sendUpdateActor } from '../../lib/activitypub/send' |
20 | import { VideoChannelCreate, VideoChannelUpdate } from '../../../shared' | 20 | import { VideoChannelCreate, VideoChannelUpdate } from '../../../shared' |
21 | import { createVideoChannel } from '../../lib/video-channel' | 21 | import { createVideoChannel } from '../../lib/video-channel' |
22 | import { createReqFiles, isNSFWHidden } from '../../helpers/express-utils' | 22 | import { createReqFiles, buildNSFWFilter } from '../../helpers/express-utils' |
23 | import { setAsyncActorKeys } from '../../lib/activitypub' | 23 | import { setAsyncActorKeys } from '../../lib/activitypub' |
24 | import { AccountModel } from '../../models/account/account' | 24 | import { AccountModel } from '../../models/account/account' |
25 | import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../initializers' | 25 | import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../initializers' |
@@ -79,6 +79,7 @@ videoChannelRouter.get('/:id/videos', | |||
79 | setDefaultSort, | 79 | setDefaultSort, |
80 | setDefaultPagination, | 80 | setDefaultPagination, |
81 | optionalAuthenticate, | 81 | optionalAuthenticate, |
82 | commonVideosFiltersValidator, | ||
82 | asyncMiddleware(listVideoChannelVideos) | 83 | asyncMiddleware(listVideoChannelVideos) |
83 | ) | 84 | ) |
84 | 85 | ||
@@ -189,7 +190,12 @@ async function listVideoChannelVideos (req: express.Request, res: express.Respon | |||
189 | start: req.query.start, | 190 | start: req.query.start, |
190 | count: req.query.count, | 191 | count: req.query.count, |
191 | sort: req.query.sort, | 192 | sort: req.query.sort, |
192 | hideNSFW: isNSFWHidden(res), | 193 | categoryOneOf: req.query.categoryOneOf, |
194 | licenceOneOf: req.query.licenceOneOf, | ||
195 | languageOneOf: req.query.languageOneOf, | ||
196 | tagsOneOf: req.query.tagsOneOf, | ||
197 | tagsAllOf: req.query.tagsAllOf, | ||
198 | nsfw: buildNSFWFilter(res, req.query.nsfw), | ||
193 | withFiles: false, | 199 | withFiles: false, |
194 | videoChannelId: videoChannelInstance.id | 200 | videoChannelId: videoChannelInstance.id |
195 | }) | 201 | }) |