feat(external_plugin): lots of refactoring for side menu link extensions and view data, #3185

This commit is contained in:
Torkel Ödegaard
2015-11-20 09:43:10 +01:00
parent 63b50ab9b1
commit df0bc7bbc4
12 changed files with 99 additions and 94 deletions
+3 -2
View File
@@ -34,8 +34,9 @@ func InitExternalPluginRoutes(r *macaron.Macaron) {
for _, plugin := range plugins.ExternalPlugins {
log.Info("Plugin: Adding proxy routes for backend plugin")
for _, route := range plugin.Routes {
log.Info("Plugin: Adding route %s /api/plugin-proxy/%s", route.Method, route.Path)
r.Route(util.JoinUrlFragments("/api/plugin-proxy/", route.Path), route.Method, ExternalPlugin(route.Url))
url := util.JoinUrlFragments("/api/plugin-proxy/", route.Path)
r.Route(url, route.Method, ExternalPlugin(route.Url))
log.Info("Plugin: Adding route %s", url)
}
}
}