|
@@ -340,8 +340,9 @@ func getAllNodes(w http.ResponseWriter, r *http.Request) {
|
|
// return all the nodes in JSON/API format
|
|
// return all the nodes in JSON/API format
|
|
apiNodes := logic.GetAllNodesAPI(nodes[:])
|
|
apiNodes := logic.GetAllNodesAPI(nodes[:])
|
|
logger.Log(3, r.Header.Get("user"), "fetched all nodes they have access to")
|
|
logger.Log(3, r.Header.Get("user"), "fetched all nodes they have access to")
|
|
|
|
+ sortedApiNodes := logic.SortApiNodes(apiNodes)
|
|
w.WriteHeader(http.StatusOK)
|
|
w.WriteHeader(http.StatusOK)
|
|
- json.NewEncoder(w).Encode(apiNodes)
|
|
|
|
|
|
+ json.NewEncoder(w).Encode(sortedApiNodes)
|
|
}
|
|
}
|
|
|
|
|
|
func getUsersNodes(user models.User) ([]models.Node, error) {
|
|
func getUsersNodes(user models.User) ([]models.Node, error) {
|