aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/logs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/logs.ts')
-rw-r--r--server/middlewares/validators/logs.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/middlewares/validators/logs.ts b/server/middlewares/validators/logs.ts
index 70e4d0d99..ba817d9a9 100644
--- a/server/middlewares/validators/logs.ts
+++ b/server/middlewares/validators/logs.ts
@@ -7,13 +7,13 @@ import { isValidLogLevel } from '../../helpers/custom-validators/logs'
7 7
8const getLogsValidator = [ 8const getLogsValidator = [
9 query('startDate') 9 query('startDate')
10 .custom(isDateValid).withMessage('Should have a valid start date'), 10 .custom(isDateValid).withMessage('Should have a start date that conforms to ISO 8601'),
11 query('level') 11 query('level')
12 .optional() 12 .optional()
13 .custom(isValidLogLevel).withMessage('Should have a valid level'), 13 .custom(isValidLogLevel).withMessage('Should have a valid level'),
14 query('endDate') 14 query('endDate')
15 .optional() 15 .optional()
16 .custom(isDateValid).withMessage('Should have a valid end date'), 16 .custom(isDateValid).withMessage('Should have an end date that conforms to ISO 8601'),
17 17
18 (req: express.Request, res: express.Response, next: express.NextFunction) => { 18 (req: express.Request, res: express.Response, next: express.NextFunction) => {
19 logger.debug('Checking getLogsValidator parameters.', { parameters: req.query }) 19 logger.debug('Checking getLogsValidator parameters.', { parameters: req.query })
@@ -26,10 +26,10 @@ const getLogsValidator = [
26 26
27const getAuditLogsValidator = [ 27const getAuditLogsValidator = [
28 query('startDate') 28 query('startDate')
29 .custom(isDateValid).withMessage('Should have a valid start date'), 29 .custom(isDateValid).withMessage('Should have a start date that conforms to ISO 8601'),
30 query('endDate') 30 query('endDate')
31 .optional() 31 .optional()
32 .custom(isDateValid).withMessage('Should have a valid end date'), 32 .custom(isDateValid).withMessage('Should have a end date that conforms to ISO 8601'),
33 33
34 (req: express.Request, res: express.Response, next: express.NextFunction) => { 34 (req: express.Request, res: express.Response, next: express.NextFunction) => {
35 logger.debug('Checking getAuditLogsValidator parameters.', { parameters: req.query }) 35 logger.debug('Checking getAuditLogsValidator parameters.', { parameters: req.query })