Skip to content

Commit 0cc2fba

Browse files
Use X-Total-Count header instead of X-Total
as proposed in go-gitea#11114 Co-authored-by: 6543 <[email protected]>
1 parent 8ae97b6 commit 0cc2fba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/repo/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ func GetPullRequestCommits(ctx *context.APIContext) {
12171217

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

0 commit comments

Comments
 (0)