mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 03:46:02 +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
|
||||
}
|
||||
if !logic.HostExists(&data.NewHost) {
|
||||
logic.CheckHostPorts(&data.NewHost)
|
||||
if err = logic.CreateHost(&data.NewHost); err != nil {
|
||||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue