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:
parent
7279b45581
commit
57c36b277e
38 changed files with 584 additions and 247 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue