diff --git a/services/convert/repo_group.go b/services/convert/repo_group.go index 31f1158411..75f94c2708 100644 --- a/services/convert/repo_group.go +++ b/services/convert/repo_group.go @@ -29,7 +29,7 @@ func ToAPIGroup(ctx context.Context, g *group_model.Group, actor *user_model.Use }); err != nil { return nil, err } - if _, apiGroup.NumRepos, err = repo_model.SearchRepositoryByCondition(ctx, &repo_model.SearchRepoOptions{ + if _, apiGroup.NumRepos, err = repo_model.SearchRepositoryByCondition(ctx, repo_model.SearchRepoOptions{ GroupID: g.ID, Actor: actor, OwnerID: g.OwnerID, diff --git a/services/group/delete.go b/services/group/delete.go index 0dc19c2560..a2f8a0ccf8 100644 --- a/services/group/delete.go +++ b/services/group/delete.go @@ -31,13 +31,13 @@ func DeleteGroup(ctx context.Context, gid int64) error { } // move all repos in the deleted group to its immediate parent - repos, cnt, err := repo_model.SearchRepository(ctx, &repo_model.SearchRepoOptions{ + repos, cnt, err := repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{ GroupID: gid, }) if err != nil { return err } - _, inParent, err := repo_model.SearchRepository(ctx, &repo_model.SearchRepoOptions{ + _, inParent, err := repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{ GroupID: toDelete.ParentGroupID, }) if err != nil { diff --git a/services/group/group.go b/services/group/group.go index 463c349a78..e26a86f7ed 100644 --- a/services/group/group.go +++ b/services/group/group.go @@ -96,7 +96,7 @@ func MoveGroupItem(ctx context.Context, itemID, newParent int64, isGroup bool, n } if newPos < 0 { var repoCount int64 - repoCount, err = repo_model.CountRepository(ctx, &repo_model.SearchRepoOptions{ + repoCount, err = repo_model.CountRepository(ctx, repo_model.SearchRepoOptions{ GroupID: newParent, }) if err != nil { diff --git a/services/group/search.go b/services/group/search.go index afe30576be..7a77fdb963 100644 --- a/services/group/search.go +++ b/services/group/search.go @@ -35,7 +35,7 @@ type GroupWebSearchOptions struct { Locale translation.Locale Recurse bool Actor *user_model.User - RepoOpts *repo_model.SearchRepoOptions + RepoOpts repo_model.SearchRepoOptions GroupOpts *group_model.FindGroupsOptions OrgID int64 }