aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-04 18:32:38 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-04 18:32:38 +0100
commit563d032e97cc62de50281e6413a8a03ed37a3d3b (patch)
tree43f09cc746f8b3b92d9d7b078ae93d2af7c3b032 /server/middlewares
parentf73544839586d5e50529617f3649a84ac9e0ab86 (diff)
downloadPeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.tar.gz
PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.tar.zst
PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.zip
Usernames are case insensitive now
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/users.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index 0b463acc0..6b845f62b 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -19,7 +19,7 @@ import {
19import { UserInstance, VideoInstance } from '../../models' 19import { UserInstance, VideoInstance } from '../../models'
20 20
21const usersAddValidator = [ 21const usersAddValidator = [
22 body('username').custom(isUserUsernameValid).withMessage('Should have a valid username'), 22 body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'),
23 body('password').custom(isUserPasswordValid).withMessage('Should have a valid password'), 23 body('password').custom(isUserPasswordValid).withMessage('Should have a valid password'),
24 body('email').isEmail().withMessage('Should have a valid email'), 24 body('email').isEmail().withMessage('Should have a valid email'),
25 body('videoQuota').custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'), 25 body('videoQuota').custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'),
@@ -196,7 +196,7 @@ function checkUserDoesNotAlreadyExist (username: string, email: string, res: exp
196 .then(user => { 196 .then(user => {
197 if (user) { 197 if (user) {
198 return res.status(409) 198 return res.status(409)
199 .send({ error: 'User already exists.' }) 199 .send({ error: 'User with this username of email already exists.' })
200 .end() 200 .end()
201 } 201 }
202 202