aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/user-notifications.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/user-notifications.ts')
-rw-r--r--server/middlewares/validators/user-notifications.ts7
1 files changed, 0 insertions, 7 deletions
diff --git a/server/middlewares/validators/user-notifications.ts b/server/middlewares/validators/user-notifications.ts
index f46303ab8..8d70dcdd2 100644
--- a/server/middlewares/validators/user-notifications.ts
+++ b/server/middlewares/validators/user-notifications.ts
@@ -2,7 +2,6 @@ import express from 'express'
2import { body, query } from 'express-validator' 2import { body, query } from 'express-validator'
3import { isNotEmptyIntArray, toBooleanOrNull } from '../../helpers/custom-validators/misc' 3import { isNotEmptyIntArray, toBooleanOrNull } from '../../helpers/custom-validators/misc'
4import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications' 4import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications'
5import { logger } from '../../helpers/logger'
6import { areValidationErrors } from './shared' 5import { areValidationErrors } from './shared'
7 6
8const listUserNotificationsValidator = [ 7const listUserNotificationsValidator = [
@@ -12,8 +11,6 @@ const listUserNotificationsValidator = [
12 .isBoolean().withMessage('Should have a valid unread boolean'), 11 .isBoolean().withMessage('Should have a valid unread boolean'),
13 12
14 (req: express.Request, res: express.Response, next: express.NextFunction) => { 13 (req: express.Request, res: express.Response, next: express.NextFunction) => {
15 logger.debug('Checking listUserNotificationsValidator parameters', { parameters: req.query })
16
17 if (areValidationErrors(req, res)) return 14 if (areValidationErrors(req, res)) return
18 15
19 return next() 16 return next()
@@ -47,8 +44,6 @@ const updateNotificationSettingsValidator = [
47 .custom(isUserNotificationSettingValid), 44 .custom(isUserNotificationSettingValid),
48 45
49 (req: express.Request, res: express.Response, next: express.NextFunction) => { 46 (req: express.Request, res: express.Response, next: express.NextFunction) => {
50 logger.debug('Checking updateNotificationSettingsValidator parameters', { parameters: req.body })
51
52 if (areValidationErrors(req, res)) return 47 if (areValidationErrors(req, res)) return
53 48
54 return next() 49 return next()
@@ -61,8 +56,6 @@ const markAsReadUserNotificationsValidator = [
61 .custom(isNotEmptyIntArray).withMessage('Should have a valid array of notification ids'), 56 .custom(isNotEmptyIntArray).withMessage('Should have a valid array of notification ids'),
62 57
63 (req: express.Request, res: express.Response, next: express.NextFunction) => { 58 (req: express.Request, res: express.Response, next: express.NextFunction) => {
64 logger.debug('Checking markAsReadUserNotificationsValidator parameters', { parameters: req.body })
65
66 if (areValidationErrors(req, res)) return 59 if (areValidationErrors(req, res)) return
67 60
68 return next() 61 return next()