Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use X-Total-Count header instead of X-Total
as proposed in #11114

Co-authored-by: 6543 <[email protected]>
  • Loading branch information
sebastian-sauer and 6543 authored Jun 30, 2021
commit 0cc2fba8fce1990f36c68ca4cf937717c2288149
2 changes: 1 addition & 1 deletion routers/api/v1/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ func GetPullRequestCommits(ctx *context.APIContext) {

ctx.Header().Set("X-Page", strconv.Itoa(listOptions.Page))
ctx.Header().Set("X-PerPage", strconv.Itoa(listOptions.PageSize))
ctx.Header().Set("X-Total", strconv.FormatInt(int64(totalNumberOfCommits), 10))
ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", totalNumberOfCommits))
ctx.Header().Set("X-PageCount", strconv.Itoa(totalNumberOfPages))
ctx.Header().Set("X-HasMore", strconv.FormatBool(listOptions.Page < totalNumberOfPages))
ctx.JSON(http.StatusOK, &apiCommits)
Expand Down