Updated various names for rsa keys to public keys, fixes ssh not connecting, better timing for editing host.

This commit is contained in:
Karmaa
2025-03-16 02:28:20 -05:00
parent fda8c7ce4b
commit bec8b67303
9 changed files with 372 additions and 164 deletions

View File

@@ -177,7 +177,18 @@ export const User = forwardRef(({ onLoginSuccess, onCreateSuccess, onDeleteSucce
});
if (response?.success) {
return response.hosts;
return response.hosts.map(host => ({
...host,
config: host.config ? {
name: host.config.name || '',
folder: host.config.folder || '',
ip: host.config.ip || '',
user: host.config.user || '',
port: host.config.port || '22',
password: host.config.password || '',
rsaKey: host.config.rsaKey || '',
} : {}
})).filter(host => host.config && host.config.ip && host.config.user);
} else {
throw new Error(response?.error || "Failed to fetch hosts");
}