func (c *UserController) PostCreate() { roles := []user.RoleType{user.RoleType(c.GetString("role"))} companyId, _ := c.GetInt("company") err := user.NewCreation(c.GetString("name"), c.GetString("email"), "123456", companyId, roles).Do() if err != nil { c.SetJsonResponse("error", err.Error()) } c.GetJsonResponse().ServeJson() }
func GetRoleDesc(role string) string { return userSrv.RoleType(role).Desc() }