This commit is contained in:
girish@cloudron.io
2016-01-20 00:05:06 -08:00
parent 402dba096e
commit b2071c65d8

View File

@@ -46,7 +46,7 @@ function createUser(req, res, next) {
if (typeof req.body.username !== 'string') return next(new HttpError(400, 'username must be string'));
if (typeof req.body.email !== 'string') return next(new HttpError(400, 'email must be string'));
if (typeof req.body.invite !== 'boolean') return next(new HttpError(400, 'invite must be boolean'));
if ('displayName' in req.body && req.body.displayName !== 'string') return next(new HttpError(400, 'displayName must be string'));
if ('displayName' in req.body && typeof req.body.displayName !== 'string') return next(new HttpError(400, 'displayName must be string'));
var username = req.body.username;
var password = generatePassword(8, true /* memorable */);