mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 23:16:52 +02:00
* Fix page and missing return on unadopted repos API Page must be 1 if it's not specified and it should return after sending an internal server error. * Allow ignore pages
This commit is contained in:
1 parent
4fb718d405
commit
054bc55a1c
5 files changed
+6
-3
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user