diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-03-19 23:40:54 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-03-19 18:40:54 -0400 |
commit | 16815306ad97488b35b7d6786fac24dea3907610 (patch) | |
tree | 78cc9b684fab0866809b84a763402be8384746e0 /routers/api | |
parent | 3934d9cd2f46bb5240f3c5dd7e7e3423eaa5c339 (diff) | |
download | gitea-16815306ad97488b35b7d6786fac24dea3907610.tar.gz gitea-16815306ad97488b35b7d6786fac24dea3907610.zip |
make sure units of a team are returned (#6379) (#6381)
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/org/team.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index a1916db00b..de5e9e7f1f 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -38,6 +38,11 @@ func ListTeams(ctx *context.APIContext) { apiTeams := make([]*api.Team, len(org.Teams)) for i := range org.Teams { + if err := org.Teams[i].GetUnits(); err != nil { + ctx.Error(500, "GetUnits", err) + return + } + apiTeams[i] = convert.ToTeam(org.Teams[i]) } ctx.JSON(200, apiTeams) |