Also display erroneous PGP keys
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
16d7fe4beb
commit
57d37544f9
3 changed files with 30 additions and 3 deletions
|
|
@ -59,3 +59,15 @@ export async function getKey(kid, userid) {
|
|||
throw new Error((await res.json()).errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteKey(kid, userid) {
|
||||
const res = await fetch(userid?`api/users/${userid}/keys/${kid}`:`api/keys/${kid}`, {
|
||||
method: 'DELETE',
|
||||
headers: {'Accept': 'application/json'}
|
||||
})
|
||||
if (res.status == 200) {
|
||||
return await res.json();
|
||||
} else {
|
||||
throw new Error((await res.json()).errmsg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue