fix some typos
This commit is contained in:
+2
-2
@@ -124,9 +124,9 @@ function passwordAuth(req, res, next) {
|
||||
|
||||
if (typeof req.body.username !== 'string') return next(new HttpError(400, 'username must be non empty string' ));
|
||||
if (typeof req.body.password !== 'string') return next(new HttpError(400, 'password must be non empty string' ));
|
||||
if ('totpToken' in req.body && typeof req.body.password !== 'string') return next(new HttpError(400, 'totpToken must be a string' ));
|
||||
if ('totpToken' in req.body && typeof req.body.totpToken !== 'string') return next(new HttpError(400, 'totpToken must be a string' ));
|
||||
|
||||
const { username, password, totpToken } = req.body.username;
|
||||
const { username, password, totpToken } = req.body;
|
||||
|
||||
const api = username.indexOf('@') !== -1 ? users.verifyWithEmail : users.verifyWithUsername;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user