mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
remove redundant lines of code, fix response when output is not plain text
This commit is contained in:
parent
6ba68d150c
commit
12d8f0f4b0
1 changed files with 1 additions and 22 deletions
|
@ -381,28 +381,7 @@ var moveNodeCmd = &cobra.Command{
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if output != "" {
|
SuccessOutput(moveResponse.Machine, "Node moved to another namespace", 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,
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue