/namespaces/{namespaceID}/teams now also returns the team right

This commit is contained in:
kolaente 2018-09-18 08:17:18 +02:00
parent db54309df4
commit 5fbf63bddc
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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)