mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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
This commit is contained in:
@@ -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{}
|
||||
|
Reference in New Issue
Block a user