Updated org creation view, after creating new org user is switched to that org and redirect to org details view, Closes #2198

This commit is contained in:
Torkel Ödegaard
2015-06-22 08:13:21 +02:00
parent d3c6db1ba8
commit 3f917b0af5
2 changed files with 12 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
)
// GET /api/org
@@ -50,7 +51,10 @@ func CreateOrg(c *middleware.Context, cmd m.CreateOrgCommand) Response {
metrics.M_Api_Org_Create.Inc(1)
return ApiSuccess("Organization created")
return Json(200, &util.DynMap{
"orgId": cmd.Result.Id,
"message": "Organization created",
})
}
// PUT /api/org