Skip to content

Commit

Permalink
Add X-Total-Count on /repos/{owner]/{repo}/pulls API (#11113)
Browse files Browse the repository at this point in the history
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
CirnoT and techknowlogick authored Apr 18, 2020
1 parent 7eace60 commit 38d5f88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routers/api/v1/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions)
}

ctx.SetLinkHeader(int(maxResults), listOptions.PageSize)
ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults))
ctx.JSON(http.StatusOK, &apiPrs)
}

Expand Down

0 comments on commit 38d5f88

Please sign in to comment.