account may be null on /account/keys

This commit is contained in:
Danny Coates 2013-09-03 12:05:38 -07:00
Родитель f71f426829
Коммит 75fdf6f2b4
2 изменённых файлов: 4 добавлений и 1 удалений

2
.gitignore поставляемый
Просмотреть файл

@ -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()
}