Use correct page size for link header pagination (#20546)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Norwin 2022-08-02 16:59:44 +02:00 committed by GitHub
parent 631539c104
commit 2754ecc293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
}