update to ironwood v0.0.0-20230513191034-495699d87ae4 with API changes

This commit is contained in:
Arceliar 2023-05-13 14:44:38 -05:00
parent 1345960d5f
commit 5e95246c26
11 changed files with 235 additions and 198 deletions

View file

@ -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