mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-30 08:54:25 +08:00
removed finished TODO
This commit is contained in:
parent
8058640cdf
commit
29bc1d5258
1 changed files with 1 additions and 2 deletions
|
@ -16,7 +16,7 @@ type hostNetworksUpdatePayload struct {
|
|||
}
|
||||
|
||||
func hostHandlers(r *mux.Router) {
|
||||
r.HandleFunc("/api/hosts", logic.SecurityCheck(false, http.HandlerFunc(getHosts))).Methods("GET")
|
||||
r.HandleFunc("/api/hosts", logic.SecurityCheck(true, http.HandlerFunc(getHosts))).Methods("GET")
|
||||
r.HandleFunc("/api/hosts/{hostid}", logic.SecurityCheck(true, http.HandlerFunc(updateHost))).Methods("PUT")
|
||||
r.HandleFunc("/api/hosts/{hostid}", logic.SecurityCheck(true, http.HandlerFunc(deleteHost))).Methods("DELETE")
|
||||
r.HandleFunc("/api/hosts/{hostid}/networks", logic.SecurityCheck(true, http.HandlerFunc(updateHostNetworks))).Methods("PUT")
|
||||
|
@ -154,7 +154,6 @@ func updateHostNetworks(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
// TODO: add and remove hosts to networks (nodes)
|
||||
if err = logic.UpdateHostNetworks(currHost, servercfg.GetServer(), payload.Networks); err != nil {
|
||||
logger.Log(0, r.Header.Get("user"), "failed to update host networks:", err.Error())
|
||||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
|
||||
|
|
Loading…
Add table
Reference in a new issue