1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Begin advanced search

This commit is contained in:
Chocobozzz 2018-07-19 16:17:54 +02:00
parent 7279b45581
commit 57c36b277e
38 changed files with 584 additions and 247 deletions

View file

@ -8,6 +8,12 @@ function setDefaultSort (req: express.Request, res: express.Response, next: expr
return next()
}
function setDefaultSearchSort (req: express.Request, res: express.Response, next: express.NextFunction) {
if (!req.query.sort) req.query.sort = '-bestmatch'
return next()
}
function setBlacklistSort (req: express.Request, res: express.Response, next: express.NextFunction) {
let newSort: SortType = { sortModel: undefined, sortValue: undefined }
@ -33,5 +39,6 @@ function setBlacklistSort (req: express.Request, res: express.Response, next: ex
export {
setDefaultSort,
setDefaultSearchSort,
setBlacklistSort
}