X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fsort.ts;h=5120804b3a34b27dc88753ff86cffd5906062ff9;hb=18dbb5b9723040e19fea1ed6b0c4f2738508ffc8;hp=6307ee1547e6359eb0c9a410525535cd941ed588;hpb=57c36b277e68b764dd34cb2e449f6e2ca3d1e9b6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/sort.ts b/server/middlewares/sort.ts index 6307ee154..5120804b3 100644 --- a/server/middlewares/sort.ts +++ b/server/middlewares/sort.ts @@ -9,13 +9,13 @@ function setDefaultSort (req: express.Request, res: express.Response, next: expr } function setDefaultSearchSort (req: express.Request, res: express.Response, next: express.NextFunction) { - if (!req.query.sort) req.query.sort = '-bestmatch' + if (!req.query.sort) req.query.sort = '-match' return next() } function setBlacklistSort (req: express.Request, res: express.Response, next: express.NextFunction) { - let newSort: SortType = { sortModel: undefined, sortValue: undefined } + let newSort: SortType = { sortModel: undefined, sortValue: '' } if (!req.query.sort) req.query.sort = '-createdAt'