Commit 818d48c2 by Marcus Efraimsson

always execute the user teams query

parent 5be2332c
...@@ -403,17 +403,17 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error { ...@@ -403,17 +403,17 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error {
if user.OrgRole == "" { if user.OrgRole == "" {
user.OrgId = -1 user.OrgId = -1
user.OrgName = "Org missing" user.OrgName = "Org missing"
} else { }
getTeamsByUserQuery := &m.GetTeamsByUserQuery{OrgId: user.OrgId, UserId: user.UserId}
err = GetTeamsByUser(getTeamsByUserQuery)
if err != nil {
return err
}
user.Teams = make([]int64, len(getTeamsByUserQuery.Result)) getTeamsByUserQuery := &m.GetTeamsByUserQuery{OrgId: user.OrgId, UserId: user.UserId}
for i, t := range getTeamsByUserQuery.Result { err = GetTeamsByUser(getTeamsByUserQuery)
user.Teams[i] = t.Id if err != nil {
} return err
}
user.Teams = make([]int64, len(getTeamsByUserQuery.Result))
for i, t := range getTeamsByUserQuery.Result {
user.Teams[i] = t.Id
} }
query.Result = &user query.Result = &user
......
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