fix: code linting

This commit is contained in:
Nick
2019-09-08 12:39:05 -04:00
parent 7634bd266d
commit 69e644e18f
13 changed files with 1114 additions and 2386 deletions

View File

@@ -291,8 +291,8 @@ module.exports = class User extends Model {
mustChangePwd: true,
continuationToken: pwdChangeToken
})
} catch (err) {
WIKI.logger.warn(err)
} catch (errc) {
WIKI.logger.warn(errc)
return reject(new WIKI.Error.AuthGenericError())
}
}
@@ -308,14 +308,14 @@ module.exports = class User extends Model {
tfaRequired: true,
continuationToken: tfaToken
})
} catch (err) {
WIKI.logger.warn(err)
} catch (errc) {
WIKI.logger.warn(errc)
return reject(new WIKI.Error.AuthGenericError())
}
}
context.req.logIn(user, { session: !strInfo.useForm }, async err => {
if (err) { return reject(err) }
context.req.logIn(user, { session: !strInfo.useForm }, async errc => {
if (errc) { return reject(errc) }
const jwtToken = await WIKI.models.users.refreshToken(user)
resolve({ jwt: jwtToken.token })
})