Also display erroneous PGP keys
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-09-20 00:52:25 +02:00
commit 57d37544f9
3 changed files with 30 additions and 3 deletions

View file

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