Worked on ease of use for non multi tenant scenarios, Closes #20
This commit is contained in:
+1
-5
@@ -4,16 +4,12 @@ import (
|
||||
"github.com/torkelo/grafana-pro/pkg/bus"
|
||||
"github.com/torkelo/grafana-pro/pkg/middleware"
|
||||
m "github.com/torkelo/grafana-pro/pkg/models"
|
||||
"github.com/torkelo/grafana-pro/pkg/util"
|
||||
)
|
||||
|
||||
// POST /api/account/signup
|
||||
// POST /api/user/signup
|
||||
func SignUp(c *middleware.Context, cmd m.CreateUserCommand) {
|
||||
|
||||
cmd.Login = cmd.Email
|
||||
cmd.Salt = util.GetRandomString(10)
|
||||
cmd.Rands = util.GetRandomString(10)
|
||||
cmd.Password = util.EncodePassword(cmd.Password, cmd.Salt)
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
c.JsonApiErr(500, "failed to create user", err)
|
||||
|
||||
Reference in New Issue
Block a user