PeerTube/server/middlewares/search.ts

12 lines
222 B
TypeScript

function setVideosSearch (req, res, next) {
if (!req.query.field) req.query.field = 'name'
return next()
}
// ---------------------------------------------------------------------------
export {
setVideosSearch
}