1
0
Fork 0
peertube/server/middlewares/search.js

16 lines
289 B
JavaScript
Raw Normal View History

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