mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-02 05:19:17 -06:00
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
|