diff options
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/user-notifications.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/middlewares/validators/user-notifications.ts b/server/middlewares/validators/user-notifications.ts index 46486e081..3ded8d8cf 100644 --- a/server/middlewares/validators/user-notifications.ts +++ b/server/middlewares/validators/user-notifications.ts | |||
@@ -28,8 +28,22 @@ const updateNotificationSettingsValidator = [ | |||
28 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new comment on my video notification setting'), | 28 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new comment on my video notification setting'), |
29 | body('videoAbuseAsModerator') | 29 | body('videoAbuseAsModerator') |
30 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new video abuse as moderator notification setting'), | 30 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new video abuse as moderator notification setting'), |
31 | body('videoAutoBlacklistAsModerator') | ||
32 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid video auto blacklist notification setting'), | ||
31 | body('blacklistOnMyVideo') | 33 | body('blacklistOnMyVideo') |
32 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new blacklist on my video notification setting'), | 34 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new blacklist on my video notification setting'), |
35 | body('myVideoImportFinished') | ||
36 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid video import finished video notification setting'), | ||
37 | body('myVideoPublished') | ||
38 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid video published notification setting'), | ||
39 | body('commentMention') | ||
40 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid comment mention notification setting'), | ||
41 | body('newFollow') | ||
42 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new follow notification setting'), | ||
43 | body('newUserRegistration') | ||
44 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new user registration notification setting'), | ||
45 | body('newInstanceFollower') | ||
46 | .custom(isUserNotificationSettingValid).withMessage('Should have a valid new instance follower notification setting'), | ||
33 | 47 | ||
34 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 48 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
35 | logger.debug('Checking updateNotificationSettingsValidator parameters', { parameters: req.body }) | 49 | logger.debug('Checking updateNotificationSettingsValidator parameters', { parameters: req.body }) |