PeerTube/server/middlewares/search.js
2016-05-22 09:15:00 +02:00

16 lines
306 B
JavaScript

'use strict'
const searchMiddleware = {
setVideosSearch: setVideosSearch
}
function setVideosSearch (req, res, next) {
if (!req.query.field) req.query.field = 'name'
return next()
}
// ---------------------------------------------------------------------------
module.exports = searchMiddleware