aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index cc75f5bf..e36f18b0 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -78,7 +78,12 @@ func Search(ctx *context.APIContext) {
// https://github.com/gogits/go-gogs-client/wiki/Repositories#list-your-repositories
func ListMyRepos(ctx *context.APIContext) {
- ownRepos, err := models.GetUserRepositories(ctx.User.ID, true, 1, ctx.User.NumRepos)
+ ownRepos, err := models.GetUserRepositories(&models.UserRepoOptions{
+ UserID: ctx.User.ID,
+ Private: true,
+ Page: 1,
+ PageSize: ctx.User.NumRepos,
+ })
if err != nil {
ctx.Error(500, "GetRepositories", err)
return