fix: deploy keys modal crash on null/undefined arrays
- sshmanager/deploy.go: initialize DeployResult with empty slices instead of nil to prevent null serialization in JSON - Machines.tsx: use ?? [] fallback for messages and errors arrays in deploy keys modal to handle null/undefined gracefully
This commit is contained in:
@@ -26,7 +26,7 @@ type DeployResult struct {
|
||||
}
|
||||
|
||||
func DeployKeysToMachine(ctx context.Context, serverKeyPath, serverPubKey string, host string, port int, user string, keys []DeployKey, knownHostsHost string, addServerPubKey bool) (*DeployResult, error) {
|
||||
result := &DeployResult{Success: true}
|
||||
result := &DeployResult{Success: true, Messages: []string{}, Errors: []string{}}
|
||||
|
||||
addr := fmt.Sprintf("%s:%d", host, port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user