aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-05-13 17:47:58 +0300
committerGitHub <noreply@github.com>2023-05-13 14:47:58 +0000
commit542adf50d5007ec85a54843c33c716b68371f341 (patch)
tree5bf13cb75234b6e821e9b4a7431e47319b11b4f7 /routers/api
parenta94a8d0ab1f6c9d63ae607dfec866c47ae3e4b5c (diff)
downloadgitea-542adf50d5007ec85a54843c33c716b68371f341.tar.gz
gitea-542adf50d5007ec85a54843c33c716b68371f341.zip
Fix `organization` field being `null` in `GET /api/v1/teams/{id}` (#24694)
Enabled the organization loading flag. - Fixes #20399 # Before ```json { ... "description": "", "organization": null, "includes_all_repositories": true, "permission": "owner", ... } ``` # After ```json { ... "description": "", "organization": { "id": 2, "name": "bigorg", "full_name": "", "avatar_url": "https://3000-yardenshoham-gitea-3gfrlc9gn4h.ws-us96b.gitpod.io/avatars/e2649b0c016d9102664a7d4349503eb9", "description": "", "website": "", "location": "", "visibility": "public", "repo_admin_change_team_access": true, "username": "bigorg" }, "includes_all_repositories": true, "permission": "owner", ... } ``` Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/org/team.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index 024fee3469..8b7d7b1951 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -126,7 +126,7 @@ func GetTeam(ctx *context.APIContext) {
// "200":
// "$ref": "#/responses/Team"
- apiTeam, err := convert.ToTeam(ctx, ctx.Org.Team)
+ apiTeam, err := convert.ToTeam(ctx, ctx.Org.Team, true)
if err != nil {
ctx.InternalServerError(err)
return