PeerTube/server/middlewares/search.js
2016-10-02 12:19:02 +02:00

16 lines
289 B
JavaScript

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