/namespaces/{namespaceID}/teams now also returns the team right
This commit is contained in:
parent
db54309df4
commit
5fbf63bddc
1 changed files with 2 additions and 3 deletions
|
@ -12,10 +12,9 @@ func (tn *TeamNamespace) ReadAll(user *User) (interface{}, error) {
|
|||
}
|
||||
|
||||
// Get the teams
|
||||
all := []*Team{}
|
||||
all := []*teamWithRight{}
|
||||
|
||||
err = x.Select("teams.*").
|
||||
Table("teams").
|
||||
err = x.Table("teams").
|
||||
Join("INNER", "team_namespaces", "team_id = teams.id").
|
||||
Where("team_namespaces.namespace_id = ?", tn.NamespaceID).
|
||||
Find(&all)
|
||||
|
|
Loading…
Reference in a new issue