diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-11 21:50:51 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-19 21:22:28 +0100 |
commit | feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c (patch) | |
tree | 2abc9fbc9569760e218fd52835850b757344b420 /server/middlewares/sort.js | |
parent | 108626609eda75e4ecc0a83a650a4d53c46220e0 (diff) | |
download | PeerTube-feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c.tar.gz PeerTube-feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c.tar.zst PeerTube-feb4bdfd9b46e87aadfa7c0d5338cde887d1f58c.zip |
First version with PostgreSQL
Diffstat (limited to 'server/middlewares/sort.js')
-rw-r--r-- | server/middlewares/sort.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/sort.js b/server/middlewares/sort.js index f0b7274eb..477e10571 100644 --- a/server/middlewares/sort.js +++ b/server/middlewares/sort.js | |||
@@ -6,13 +6,13 @@ const sortMiddleware = { | |||
6 | } | 6 | } |
7 | 7 | ||
8 | function setUsersSort (req, res, next) { | 8 | function setUsersSort (req, res, next) { |
9 | if (!req.query.sort) req.query.sort = '-createdDate' | 9 | if (!req.query.sort) req.query.sort = '-createdAt' |
10 | 10 | ||
11 | return next() | 11 | return next() |
12 | } | 12 | } |
13 | 13 | ||
14 | function setVideosSort (req, res, next) { | 14 | function setVideosSort (req, res, next) { |
15 | if (!req.query.sort) req.query.sort = '-createdDate' | 15 | if (!req.query.sort) req.query.sort = '-createdAt' |
16 | 16 | ||
17 | return next() | 17 | return next() |
18 | } | 18 | } |