diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-03-19 22:50:06 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-03-19 17:50:06 -0400 |
commit | 5c82ef098e9d6138298c32f700bf46d2d5b3b14b (patch) | |
tree | a5847c97138930d269d51478daadd72b23cc94bd /routers | |
parent | 359d3ed01dcc9b9a8b0dadba04a8df708831de23 (diff) | |
download | gitea-5c82ef098e9d6138298c32f700bf46d2d5b3b14b.tar.gz gitea-5c82ef098e9d6138298c32f700bf46d2d5b3b14b.zip |
make sure units of a team are returned (#6379)
Diffstat (limited to 'routers')
-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 ca3de9f04e..d1b7dfbce8 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) |