fix some typos

This commit is contained in:
Girish Ramakrishnan
2020-12-20 14:41:16 -08:00
parent 56707ac86a
commit e5209a1392
2 changed files with 4 additions and 4 deletions

View File

@@ -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');