1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add jobs tag to logger

This commit is contained in:
Chocobozzz 2021-03-09 09:22:05 +01:00
parent db4b15f21f
commit 18b24b2dc5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 28 additions and 21 deletions

View file

@ -17,12 +17,12 @@ function areValidationErrors (req: express.Request, res: express.Response) {
return false
}
function checkSort (sortableColumns: string[]) {
function checkSort (sortableColumns: string[], tags: string[] = []) {
return [
query('sort').optional().isIn(sortableColumns).withMessage('Should have correct sortable column'),
(req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking sort parameters', { parameters: req.query })
logger.debug('Checking sort parameters', { parameters: req.query, tags })
if (areValidationErrors(req, res)) return