Rename GetUnits to LoadUnits (#22970)

Same as https://github.com/go-gitea/gitea/pull/22967

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
yp05327 2023-02-19 17:31:39 +09:00 committed by GitHub
parent 61b89747ed
commit 7eaf192967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 13 deletions

View file

@ -304,7 +304,7 @@ func ToTeams(ctx context.Context, teams []*organization.Team, loadOrgs bool) ([]
cache := make(map[int64]*api.Organization)
apiTeams := make([]*api.Team, len(teams))
for i := range teams {
if err := teams[i].GetUnits(); err != nil {
if err := teams[i].LoadUnits(ctx); err != nil {
return nil, err
}