JSON-based SQL query for node tree
This commit is contained in:
parent
f1f0f499dd
commit
0138f72b83
2 changed files with 92 additions and 65 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue