aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/search.js
blob: bb88faf545b23d5585d517aa52ff22cf0702be24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'

const searchMiddleware = {
  setVideosSearch
}

function setVideosSearch (req, res, next) {
  if (!req.query.field) req.query.field = 'name'

  return next()
}

// ---------------------------------------------------------------------------

module.exports = searchMiddleware