removed finished TODO

This commit is contained in:
0xdcarns 2022-12-23 14:40:29 -05:00
parent 8058640cdf
commit 29bc1d5258

View file

@ -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"))