mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-09 13:26:52 +08:00
added host port check on migrate
This commit is contained in:
parent
e17505979a
commit
ca24d5074f
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ func migrate(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !logic.HostExists(&data.NewHost) {
|
if !logic.HostExists(&data.NewHost) {
|
||||||
|
logic.CheckHostPorts(&data.NewHost)
|
||||||
if err = logic.CreateHost(&data.NewHost); err != nil {
|
if err = logic.CreateHost(&data.NewHost); err != nil {
|
||||||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue