forked from Mirrors/keyoxide-web
Send 500 if no key found
This commit is contained in:
parent
29ccb63bf1
commit
9eb4069253
1 changed files with 6 additions and 1 deletions
|
@ -258,6 +258,11 @@ router.get('/profile/fetch',
|
|||
break;
|
||||
}
|
||||
|
||||
if (data.errors.length > 0) {
|
||||
delete data.key
|
||||
res.status(500).send(data)
|
||||
}
|
||||
|
||||
// Return public key
|
||||
if (req.query.returnPublicKey) {
|
||||
data.keyData.key.data = data.key.publicKey
|
||||
|
|
Loading…
Reference in a new issue