]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/sort.ts
Add ability to remove a video import
[github/Chocobozzz/PeerTube.git] / server / middlewares / sort.ts
index 6307ee1547e6359eb0c9a410525535cd941ed588..5120804b3a34b27dc88753ff86cffd5906062ff9 100644 (file)
@@ -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'