You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to add more routes to the Router function into the router.Http{} of http.go file of plugins, in order to serve multiple endpoints from one plugin, such as:
func Router(s *service.Service) []router.Http {
svc = s
return []router.Http{
{"accounts", accounts},
{"account/address", accountdetails},
}
}
However this doesn't seem to work, the response for either endpoint is always that of the last function/endpoint (in this case func accountdetails. Response will be returned value of func accounts if I put that endpoint as the last one).
Is there any way to fix and enable the router to handle multiple endpoints?
Thanks
Lukas
The text was updated successfully, but these errors were encountered:
I have been trying to add more routes to the Router function into the router.Http{} of http.go file of plugins, in order to serve multiple endpoints from one plugin, such as:
func Router(s *service.Service) []router.Http {
svc = s
return []router.Http{
{"accounts", accounts},
{"account/address", accountdetails},
}
}
However this doesn't seem to work, the response for either endpoint is always that of the last function/endpoint (in this case func accountdetails. Response will be returned value of func accounts if I put that endpoint as the last one).
Is there any way to fix and enable the router to handle multiple endpoints?
Thanks
Lukas
The text was updated successfully, but these errors were encountered: