Simplify root API
This commit is contained in:
parent
7061f13b24
commit
3b3e6d2bfc
8 changed files with 149 additions and 299 deletions
|
@ -355,6 +355,7 @@ func createAPIServer(basePath string, node *Node) (*http.Server, error) {
|
|||
if req.Method == http.MethodPost || req.Method == http.MethodPut {
|
||||
if queriedID == 0 {
|
||||
apiSendObj(out, req, http.StatusBadRequest, nil)
|
||||
} else {
|
||||
}
|
||||
} else if req.Method == http.MethodGet || req.Method == http.MethodHead {
|
||||
roots := node.Roots()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue