diff options
Diffstat (limited to 'routers/api/v1/org/team.go')
-rw-r--r-- | routers/api/v1/org/team.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index a84763d6f6..0dc1b68aee 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -9,6 +9,7 @@ import ( "net/http" "code.gitea.io/gitea/models" + unit_model "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" @@ -172,7 +173,7 @@ func CreateTeam(ctx *context.APIContext) { Authorize: models.ParseAccessMode(form.Permission), } - unitTypes := models.FindUnitTypes(form.Units...) + unitTypes := unit_model.FindUnitTypes(form.Units...) if team.Authorize < models.AccessModeOwner { var units = make([]*models.TeamUnit, 0, len(form.Units)) @@ -260,7 +261,7 @@ func EditTeam(ctx *context.APIContext) { if team.Authorize < models.AccessModeOwner { if len(form.Units) > 0 { var units = make([]*models.TeamUnit, 0, len(form.Units)) - unitTypes := models.FindUnitTypes(form.Units...) + unitTypes := unit_model.FindUnitTypes(form.Units...) for _, tp := range unitTypes { units = append(units, &models.TeamUnit{ OrgID: ctx.Org.Team.OrgID, |