Commit 6115941d by bergquist

middleware: rename org-id -> orgId

parent 5174d050
......@@ -11,7 +11,7 @@ import (
func OrgRedirect() macaron.Handler {
return func(res http.ResponseWriter, req *http.Request, c *macaron.Context) {
orgId := c.QueryInt64("org-id")
orgId := c.QueryInt64("orgId")
if orgId == 0 {
return
}
......
......@@ -28,7 +28,7 @@ func TestOrgRedirectMiddleware(t *testing.T) {
})
sc.m.Get("/", sc.defaultHandler)
sc.fakeReq("GET", "/?org-id=3").exec()
sc.fakeReq("GET", "/?orgId=3").exec()
Convey("change org and redirect", func() {
So(sc.resp.Code, ShouldEqual, 302)
......@@ -50,7 +50,7 @@ func TestOrgRedirectMiddleware(t *testing.T) {
})
sc.m.Get("/", sc.defaultHandler)
sc.fakeReq("GET", "/?org-id=3").exec()
sc.fakeReq("GET", "/?orgId=3").exec()
Convey("not allowed to change org", func() {
So(sc.resp.Code, ShouldEqual, 404)
......
......@@ -113,7 +113,7 @@ func (c *EvalContext) GetRuleUrl() (string, error) {
if slug, err := c.GetDashboardSlug(); err != nil {
return "", err
} else {
ruleUrl := fmt.Sprintf("%sdashboard/db/%s?fullscreen&edit&tab=alert&panelId=%d&org-id=%d", setting.AppUrl, slug, c.Rule.PanelId, c.Rule.OrgId)
ruleUrl := fmt.Sprintf("%sdashboard/db/%s?fullscreen&edit&tab=alert&panelId=%d&orgId=%d", setting.AppUrl, slug, c.Rule.PanelId, c.Rule.OrgId)
return ruleUrl, nil
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment