mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add pagination headers on endpoints that support total count from database (#11145)
* begin work * import fmt * more work * empty commit Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
committed by
GitHub
parent
a07cc0df76
commit
81324cf37c
@@ -20,6 +20,7 @@ import (
|
||||
// listMembers list an organization's members
|
||||
func listMembers(ctx *context.APIContext, publicOnly bool) {
|
||||
var members []*models.User
|
||||
|
||||
members, _, err := models.FindOrgMembers(&models.FindOrgMembersOpts{
|
||||
OrgID: ctx.Org.Organization.ID,
|
||||
PublicOnly: publicOnly,
|
||||
@@ -34,6 +35,7 @@ func listMembers(ctx *context.APIContext, publicOnly bool) {
|
||||
for i, member := range members {
|
||||
apiMembers[i] = convert.ToUser(member, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin)
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, apiMembers)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user