Fixed anonymous access mode, Closes #1586

This commit is contained in:
Torkel Ödegaard
2015-03-11 17:34:11 +01:00
parent f3d4d2782f
commit 477e035f2e
6 changed files with 25 additions and 31 deletions
+3 -7
View File
@@ -47,15 +47,11 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string) *httputil.ReverseProxy
// TODO: need to cache datasources
func ProxyDataSourceRequest(c *middleware.Context) {
id := c.ParamsInt64(":id")
query := m.GetDataSourceByIdQuery{Id: id, OrgId: c.OrgId}
query := m.GetDataSourceByIdQuery{
Id: id,
OrgId: c.OrgId,
}
err := bus.Dispatch(&query)
if err != nil {
if err := bus.Dispatch(&query); err != nil {
c.JsonApiErr(500, "Unable to load datasource meta data", err)
return
}
proxyPath := c.Params("*")