summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-22 21:51:45 +0800
committerGitHub <noreply@github.com>2021-11-22 21:51:45 +0800
commitc2ab19888f92fbdec4276a16d224e8de80d1d1dd (patch)
tree1fdbf05d1b6d2a99e88e8219133a252fce6562d5 /integrations
parented23a6c39704c329ec4940bfec16739a0d3d3e91 (diff)
downloadgitea-c2ab19888f92fbdec4276a16d224e8de80d1d1dd.tar.gz
gitea-c2ab19888f92fbdec4276a16d224e8de80d1d1dd.zip
Support pagination of organizations on user settings pages (#16083)
* Add pagination for user setting orgs * Use FindOrgs instead of GetOrgsByUserID * Remove unnecessary functions and fix test * remove unnecessary code
Diffstat (limited to 'integrations')
-rw-r--r--integrations/org_count_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/integrations/org_count_test.go b/integrations/org_count_test.go
index a394dba01c..a45d1e81b5 100644
--- a/integrations/org_count_test.go
+++ b/integrations/org_count_test.go
@@ -116,7 +116,10 @@ func doCheckOrgCounts(username string, orgCounts map[string]int, strict bool, ca
Name: username,
}).(*models.User)
- orgs, err := models.GetOrgsByUserID(user.ID, true)
+ orgs, err := models.FindOrgs(models.FindOrgOptions{
+ UserID: user.ID,
+ IncludePrivate: true,
+ })
assert.NoError(t, err)
calcOrgCounts := map[string]int{}