aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorDionysios Kakouris <1369451+memphis88@users.noreply.github.com>2023-09-21 10:09:59 +0200
committerGitHub <noreply@github.com>2023-09-21 08:09:59 +0000
commite46274b5b478f821eb915348a28b114cd4b1eb0a (patch)
tree9022127878076e249a93854275134812c3ab336f /routers
parent14731a34ff4d854b8427fa3ca880f40bcd86e1e3 (diff)
downloadgitea-e46274b5b478f821eb915348a28b114cd4b1eb0a.tar.gz
gitea-e46274b5b478f821eb915348a28b114cd4b1eb0a.zip
Fix organization field being null in POST /orgs/{orgid}/teams (#27150)
Similarly to the fix in https://github.com/go-gitea/gitea/pull/24694, this addresses the team creation not returning the organization information in the response. This fix is connected to the [issue](https://gitea.com/gitea/terraform-provider-gitea/issues/27) discovered in the terraform provider. Moreover, the [documentation](https://docs.gitea.com/api/1.20/#tag/organization/operation/orgCreateTeam) suggests that the response body should include the `organization` field (currently being `null`).
Diffstat (limited to 'routers')
-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 519572ee51..83cbfe68d0 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -248,7 +248,7 @@ func CreateTeam(ctx *context.APIContext) {
return
}
- apiTeam, err := convert.ToTeam(ctx, team)
+ apiTeam, err := convert.ToTeam(ctx, team, true)
if err != nil {
ctx.InternalServerError(err)
return