account may be null on /account/keys
This commit is contained in:
Родитель
f71f426829
Коммит
75fdf6f2b4
|
@ -4,5 +4,5 @@
|
|||
/config/public-key.json
|
||||
/config/secret-key.json
|
||||
*.swp
|
||||
server.log
|
||||
server.log*
|
||||
/config/awsbox-secrets.json.gpg
|
||||
|
|
|
@ -124,6 +124,9 @@ module.exports = function (log, crypto, uuid, isA, error, Account, RecoveryEmail
|
|||
.then(Account.get.bind(null, keyFetchToken.uid))
|
||||
.then(
|
||||
function (account) {
|
||||
if (!account) {
|
||||
throw error.unknownAccount()
|
||||
}
|
||||
if (!account.verified) {
|
||||
throw error.unverifiedAccount()
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче