aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/me.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-20 09:19:21 +0200
committerChocobozzz <me@florianbigard.com>2020-08-20 11:05:45 +0200
commit8054669f1181e815c435e76e81247eff32d41dc5 (patch)
tree6938a880d7e71a132fa0fc5adf143a21a8b9f938 /server/controllers/api/users/me.ts
parent1c58423f6c42f494ea6358043bcb5a735b7bd5d7 (diff)
downloadPeerTube-8054669f1181e815c435e76e81247eff32d41dc5.tar.gz
PeerTube-8054669f1181e815c435e76e81247eff32d41dc5.tar.zst
PeerTube-8054669f1181e815c435e76e81247eff32d41dc5.zip
Optimize default sort when listing videos
createdAt does not have the appropriate index
Diffstat (limited to 'server/controllers/api/users/me.ts')
-rw-r--r--server/controllers/api/users/me.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index 914c52e27..ba60a3d2a 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -17,6 +17,7 @@ import {
17 paginationValidator, 17 paginationValidator,
18 setDefaultPagination, 18 setDefaultPagination,
19 setDefaultSort, 19 setDefaultSort,
20 setDefaultVideosSort,
20 usersUpdateMeValidator, 21 usersUpdateMeValidator,
21 usersVideoRatingValidator 22 usersVideoRatingValidator
22} from '../../../middlewares' 23} from '../../../middlewares'
@@ -60,7 +61,7 @@ meRouter.get('/me/videos',
60 authenticate, 61 authenticate,
61 paginationValidator, 62 paginationValidator,
62 videosSortValidator, 63 videosSortValidator,
63 setDefaultSort, 64 setDefaultVideosSort,
64 setDefaultPagination, 65 setDefaultPagination,
65 asyncMiddleware(getUserVideos) 66 asyncMiddleware(getUserVideos)
66) 67)