JSON-based SQL query for node tree

This commit is contained in:
Magnus Åhall 2025-07-31 12:37:34 +02:00
parent f1f0f499dd
commit 0138f72b83
2 changed files with 92 additions and 65 deletions

View file

@ -105,7 +105,12 @@ func actionNodesTree(w http.ResponseWriter, r *http.Request) { // {{{
maxDepth = 3
}
topNode, err := GetNodeTree(startNode, maxDepth)
var withData bool
if r.URL.Query().Get("data") == "true" {
withData = true
}
topNode, err := GetNodeTree(startNode, maxDepth, withData)
if err != nil {
err = werr.Wrap(err)
httpError(w, err)