aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index 71e529872..eeb0e3557 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -12,6 +12,7 @@ function usersAddValidator (req: express.Request, res: express.Response, next: e
12 req.checkBody('username', 'Should have a valid username').isUserUsernameValid() 12 req.checkBody('username', 'Should have a valid username').isUserUsernameValid()
13 req.checkBody('password', 'Should have a valid password').isUserPasswordValid() 13 req.checkBody('password', 'Should have a valid password').isUserPasswordValid()
14 req.checkBody('email', 'Should have a valid email').isEmail() 14 req.checkBody('email', 'Should have a valid email').isEmail()
15 req.checkBody('videoQuota', 'Should have a valid user quota').isUserVideoQuotaValid()
15 16
16 logger.debug('Checking usersAdd parameters', { parameters: req.body }) 17 logger.debug('Checking usersAdd parameters', { parameters: req.body })
17 18
@@ -55,6 +56,7 @@ function usersUpdateValidator (req: express.Request, res: express.Response, next
55 // Add old password verification 56 // Add old password verification
56 req.checkBody('password', 'Should have a valid password').optional().isUserPasswordValid() 57 req.checkBody('password', 'Should have a valid password').optional().isUserPasswordValid()
57 req.checkBody('displayNSFW', 'Should have a valid display Not Safe For Work attribute').optional().isUserDisplayNSFWValid() 58 req.checkBody('displayNSFW', 'Should have a valid display Not Safe For Work attribute').optional().isUserDisplayNSFWValid()
59 req.checkBody('videoQuota', 'Should have a valid user quota').optional().isUserVideoQuotaValid()
58 60
59 logger.debug('Checking usersUpdate parameters', { parameters: req.body }) 61 logger.debug('Checking usersUpdate parameters', { parameters: req.body })
60 62