feat: edit identities

This commit is contained in:
2026-05-14 11:35:59 +00:00
parent 5bba2947c4
commit 035f871b00
2 changed files with 160 additions and 7 deletions
+19
View File
@@ -153,6 +153,25 @@ export const api = {
return handle(res);
},
async updateIdentity(
id: number,
body: Partial<{
label: string;
ssh_username: string;
password: string;
private_key: string;
key_passphrase: string;
}>,
): Promise<void> {
const res = await fetch(`/api/identities/${id}`, {
method: "PATCH",
credentials: "include",
headers: jsonHeaders,
body: JSON.stringify(body),
});
await handle(res);
},
async deleteIdentity(id: number): Promise<void> {
const res = await fetch(`/api/identities/${id}`, {
method: "DELETE",