mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Filter host for channels and playlists search
This commit is contained in:
parent
f68d1cb6ac
commit
fa47956ecf
18 changed files with 237 additions and 80 deletions
|
@ -43,7 +43,14 @@ const videosSearchValidator = [
|
|||
|
||||
const videoChannelsListSearchValidator = [
|
||||
query('search').not().isEmpty().withMessage('Should have a valid search'),
|
||||
query('searchTarget').optional().custom(isSearchTargetValid).withMessage('Should have a valid search target'),
|
||||
|
||||
query('host')
|
||||
.optional()
|
||||
.custom(isHostValid).withMessage('Should have a valid host'),
|
||||
|
||||
query('searchTarget')
|
||||
.optional()
|
||||
.custom(isSearchTargetValid).withMessage('Should have a valid search target'),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking video channels search query', { parameters: req.query })
|
||||
|
@ -56,7 +63,14 @@ const videoChannelsListSearchValidator = [
|
|||
|
||||
const videoPlaylistsListSearchValidator = [
|
||||
query('search').not().isEmpty().withMessage('Should have a valid search'),
|
||||
query('searchTarget').optional().custom(isSearchTargetValid).withMessage('Should have a valid search target'),
|
||||
|
||||
query('host')
|
||||
.optional()
|
||||
.custom(isHostValid).withMessage('Should have a valid host'),
|
||||
|
||||
query('searchTarget')
|
||||
.optional()
|
||||
.custom(isSearchTargetValid).withMessage('Should have a valid search target'),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking video playlists search query', { parameters: req.query })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue