Skip to content

Commit

Permalink
remove redundant lines of code, fix response when output is not plain…
Browse files Browse the repository at this point in the history
… text
  • Loading branch information
Igor Perepilitsyn committed May 2, 2022
1 parent 6ba68d1 commit 12d8f0f
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions cmd/headscale/cli/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,28 +381,7 @@ var moveNodeCmd = &cobra.Command{
return
}

if output != "" {
SuccessOutput(moveResponse, "", output)

return
}
if err != nil {
ErrorOutput(
err,
fmt.Sprintf(
"Error moving node: %s",
status.Convert(err).Message(),
),
output,
)

return
}
SuccessOutput(
map[string]string{"Result": "Node moved to another namespace"},
"Node moved to another namespace",
output,
)
SuccessOutput(moveResponse.Machine, "Node moved to another namespace", output)
},
}

Expand Down

0 comments on commit 12d8f0f

Please sign in to comment.