mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-21 13:26:29 +03:00
update to ironwood v0.0.0-20230513191034-495699d87ae4 with API changes
This commit is contained in:
@@ -132,14 +132,14 @@ func (a *AdminSocket) SetupAdminHandlers() {
|
||||
},
|
||||
)
|
||||
_ = a.AddHandler(
|
||||
"getDHT", "Show known DHT entries", []string{},
|
||||
"getTree", "Show known Tree entries", []string{},
|
||||
func(in json.RawMessage) (interface{}, error) {
|
||||
req := &GetDHTRequest{}
|
||||
res := &GetDHTResponse{}
|
||||
req := &GetTreeRequest{}
|
||||
res := &GetTreeResponse{}
|
||||
if err := json.Unmarshal(in, &req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := a.getDHTHandler(req, res); err != nil {
|
||||
if err := a.getTreeHandler(req, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return res, nil
|
||||
|
||||
Reference in New Issue
Block a user