diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/repo.go | 2 | ||||
-rw-r--r-- | routers/user/home.go | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index edd6a72637..e44159817e 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -5,6 +5,7 @@ package repo import ( + "fmt" "strings" api "code.gitea.io/sdk/gitea" @@ -91,6 +92,7 @@ func Search(ctx *context.APIContext) { } ctx.SetLinkHeader(int(count), setting.API.MaxResponseItems) + ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", count)) ctx.JSON(200, api.SearchResults{ OK: true, Data: results, diff --git a/routers/user/home.go b/routers/user/home.go index b2096bc2ce..1707d9d097 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -131,6 +131,7 @@ func Dashboard(ctx *context.Context) { ctx.Data["Title"] = ctxUser.DisplayName() + " - " + ctx.Tr("dashboard") ctx.Data["PageIsDashboard"] = true ctx.Data["PageIsNews"] = true + ctx.Data["SearchLimit"] = setting.UI.User.RepoPagingNum // Only user can have collaborative repositories. if !ctxUser.IsOrganization() { |