From 741cf724ae6cff9b023016b9a6f42a8a9f23647c Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Tue, 26 Feb 2019 00:18:03 +0000 Subject: [webapp/setup] StartPageSetup now uses the new UserCreateForm component & small fixes --- server/lib/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/lib/authentication.js') diff --git a/server/lib/authentication.js b/server/lib/authentication.js index 9c1062c..b9c87d1 100644 --- a/server/lib/authentication.js +++ b/server/lib/authentication.js @@ -38,7 +38,7 @@ async function signup (req, res) { // TODO: Implement some security stuff. Not every user who call this request should be able to sign up. var params = req.body if (!params.username) return res.status(400).send({ auth: false, status: 'USER_MISSING', error_message: 'This service requires an username.' }) - if (validateUsername(params.username)) return res.status(400).send({ auth: false, status: 'INVALID_USERNAME', error_message: 'Username does not fullfill the requirements. (No whitespaces)' }) + if (!validateUsername(params.username)) return res.status(400).send({ auth: false, status: 'INVALID_USERNAME', error_message: 'Username does not fullfill the requirements. (No whitespaces)' }) if (!params.password) return res.status(400).send({ auth: false, status: 'PASSWORD_MISSING', error_message: 'This services requires a password.' }) // if (!params.email) return res.status(500).send({ auth: false, status: 'EMAIL_MISSING', error_message: 'This services requires an email.' }) -- cgit v1.2.3-55-g7522