mirror of https://github.com/Chocobozzz/PeerTube
16 lines
289 B
JavaScript
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
|