aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-09 09:22:05 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:40 +0100
commit18b24b2dc5a21007f62b2e625d50b1f4b7dec784 (patch)
tree11327be380e5fef0795358b189be68aa5d78924b /server/middlewares/validators/utils.ts
parentdb4b15f21fbf4e33434e930ffc7fb768cdcf9d42 (diff)
downloadPeerTube-18b24b2dc5a21007f62b2e625d50b1f4b7dec784.tar.gz
PeerTube-18b24b2dc5a21007f62b2e625d50b1f4b7dec784.tar.zst
PeerTube-18b24b2dc5a21007f62b2e625d50b1f4b7dec784.zip
Add jobs tag to logger
Diffstat (limited to 'server/middlewares/validators/utils.ts')
-rw-r--r--server/middlewares/validators/utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/utils.ts b/server/middlewares/validators/utils.ts
index 2899bed6f..4167f6d43 100644
--- a/server/middlewares/validators/utils.ts
+++ b/server/middlewares/validators/utils.ts
@@ -17,12 +17,12 @@ function areValidationErrors (req: express.Request, res: express.Response) {
17 return false 17 return false
18} 18}
19 19
20function checkSort (sortableColumns: string[]) { 20function checkSort (sortableColumns: string[], tags: string[] = []) {
21 return [ 21 return [
22 query('sort').optional().isIn(sortableColumns).withMessage('Should have correct sortable column'), 22 query('sort').optional().isIn(sortableColumns).withMessage('Should have correct sortable column'),
23 23
24 (req: express.Request, res: express.Response, next: express.NextFunction) => { 24 (req: express.Request, res: express.Response, next: express.NextFunction) => {
25 logger.debug('Checking sort parameters', { parameters: req.query }) 25 logger.debug('Checking sort parameters', { parameters: req.query, tags })
26 26
27 if (areValidationErrors(req, res)) return 27 if (areValidationErrors(req, res)) return
28 28