mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-16 22:01:19 +08:00
added host port check on migrate
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user