fix some typos
This commit is contained in:
@@ -21,9 +21,9 @@ function passwordAuth(req, res, next) {
|
||||
|
||||
if (!req.body.username || typeof req.body.username !== 'string') return next(new HttpError(400, 'A username must be non-empty string'));
|
||||
if (!req.body.password || typeof req.body.password !== 'string') return next(new HttpError(400, 'A 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;
|
||||
|
||||
function check2FA(user) {
|
||||
assert.strictEqual(typeof user, 'object');
|
||||
|
||||
Reference in New Issue
Block a user