updates
Server Deploy / deploy (push) Successful in 1m25s

This commit is contained in:
domrichardson
2026-06-16 11:07:18 +01:00
parent 4ea7f369f1
commit 407a610cfb
8 changed files with 243 additions and 16 deletions
+7 -2
View File
@@ -20,6 +20,7 @@ export interface Key {
fingerprint: string;
source: KeySource;
generated_by_server_id?: string;
has_private_key: boolean;
created_at: string;
assigned_count?: number;
}
@@ -124,13 +125,17 @@ export const api = {
return request<KeyWithAssignments>(`/keys/${keyId}`);
},
uploadKey(label: string, public_key: string): Promise<Key> {
uploadKey(label: string, public_key: string, private_key?: string): Promise<Key> {
return request<Key>("/keys", {
method: "POST",
body: JSON.stringify({ label, public_key }),
body: JSON.stringify({ label, public_key, private_key: private_key || undefined }),
});
},
getPrivateKey(keyId: string): Promise<{ private_key: string }> {
return request<{ private_key: string }>(`/keys/${keyId}/private-key`);
},
deleteKey(keyId: string): Promise<void> {
return request<void>(`/keys/${keyId}`, { method: "DELETE" });
},