diff --git a/tools/api.go b/tools/api.go index cdd7878..7b8cebd 100644 --- a/tools/api.go +++ b/tools/api.go @@ -51,14 +51,14 @@ func (s State) String() string { type API struct{} -func (a *API) Discovered() { +func (a *API) Discovered(infos []*beego.ControllerInfo) { respondToDiscovery := func(m map[string]interface{}) { if len(m) == 0 { - a.SubscribeRouter() + a.SubscribeRouter(infos) } } a.ListenRouter(respondToDiscovery) - a.SubscribeRouter() + a.SubscribeRouter(infos) } // GetState returns the state of the API