mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
fixed network tests that failed with nodes
This commit is contained in:
@@ -387,6 +387,12 @@ func checkIn(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
//TODO: check node last modified vs network last modified
|
||||
//Get Updated node to return
|
||||
node, err = GetNode(params["macaddress"], params["network"])
|
||||
if err != nil {
|
||||
returnErrorResponse(w, r, formatError(err, "internal"))
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(node)
|
||||
|
||||
@@ -660,6 +666,10 @@ func validateGateway(gateway models.GatewayRequest) error {
|
||||
if empty || !isIpv4 {
|
||||
err = errors.New("IP Range Not Valid")
|
||||
}
|
||||
empty = gateway.Interface == ""
|
||||
if empty {
|
||||
err = errors.New("Interface cannot be empty")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user