From 2754ecc293ffa8c9b44f2bd60dc83d295fc037ba Mon Sep 17 00:00:00 2001 From: Norwin Date: Tue, 2 Aug 2022 16:59:44 +0200 Subject: [PATCH] Use correct page size for link header pagination (#20546) Co-authored-by: Lunny Xiao Co-authored-by: wxiaoguang --- routers/api/v1/repo/issue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index ddad18ef62..08e3e03741 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -282,7 +282,7 @@ func SearchIssues(ctx *context.APIContext) { } } - ctx.SetLinkHeader(int(filteredCount), setting.UI.IssuePagingNum) + ctx.SetLinkHeader(int(filteredCount), limit) ctx.SetTotalCountHeader(filteredCount) ctx.JSON(http.StatusOK, convert.ToAPIIssueList(issues)) }