]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/middlewares/sort.js
Add issue template
[github/Chocobozzz/PeerTube.git] / server / middlewares / sort.js
1 'use strict'
2
3 const sortMiddleware = {
4 setVideosSort: setVideosSort
5 }
6
7 function setVideosSort (req, res, next) {
8 if (!req.query.sort) req.query.sort = '-createdDate'
9
10 return next()
11 }
12
13 // ---------------------------------------------------------------------------
14
15 module.exports = sortMiddleware