aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/subscriber.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/subscriber.go')
-rw-r--r--routers/api/v1/repo/subscriber.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go
index 352f842884..d3cd8ccc3b 100644
--- a/routers/api/v1/repo/subscriber.go
+++ b/routers/api/v1/repo/subscriber.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"
)
// ListSubscribers list a repo's subscribers (i.e. watchers)
@@ -30,11 +31,19 @@ func ListSubscribers(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"
- subscribers, err := ctx.Repo.Repository.GetWatchers(0)
+ subscribers, err := ctx.Repo.Repository.GetWatchers(utils.GetListOptions(ctx))
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetWatchers", err)
return