aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/star.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/star.go')
-rw-r--r--routers/api/v1/repo/star.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go
index 65a99d442a..c68f8f2744 100644
--- a/routers/api/v1/repo/star.go
+++ b/routers/api/v1/repo/star.go
@@ -10,6 +10,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/convert"
api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/routers/api/v1/utils"
)
// ListStargazers list a repository's stargazers
@@ -30,11 +31,19 @@ func ListStargazers(ctx *context.APIContext) {
// description: name of the repo
// type: string
// required: true
+ // - name: page
+ // in: query
+ // description: page number of results to return (1-based)
+ // type: integer
+ // - name: limit
+ // in: query
+ // description: page size of results, maximum page size is 50
+ // type: integer
// responses:
// "200":
// "$ref": "#/responses/UserList"
- stargazers, err := ctx.Repo.Repository.GetStargazers(-1)
+ stargazers, err := ctx.Repo.Repository.GetStargazers(utils.GetListOptions(ctx))
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetStargazers", err)
return