]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/middlewares/search.ts
Cleanup helpers
[github/Chocobozzz/PeerTube.git] / server / middlewares / search.ts
1 import 'express-validator'
2 import * as express from 'express'
3
4 function setVideosSearch (req: express.Request, res: express.Response, next: express.NextFunction) {
5 if (!req.query.field) req.query.field = 'name'
6
7 return next()
8 }
9
10 // ---------------------------------------------------------------------------
11
12 export {
13 setVideosSearch
14 }