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

const searchMiddleware = {
  setVideosSearch: setVideosSearch
}

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

  return next()
}

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

module.exports = searchMiddleware