diff options
Diffstat (limited to 'routers/api/v1/admin/adopt.go')
-rw-r--r-- | routers/api/v1/admin/adopt.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go index 1c0e237cdb..db1754c8d0 100644 --- a/routers/api/v1/admin/adopt.go +++ b/routers/api/v1/admin/adopt.go @@ -43,9 +43,13 @@ func ListUnadoptedRepositories(ctx *context.APIContext) { // "$ref": "#/responses/forbidden" listOptions := utils.GetListOptions(ctx) + if listOptions.Page == 0 { + listOptions.Page = 1 + } repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx.FormString("query"), &listOptions) if err != nil { ctx.InternalServerError(err) + return } ctx.SetTotalCountHeader(int64(count)) |