diff options
author | CirnoT <1447794+CirnoT@users.noreply.github.com> | 2020-04-18 08:53:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 02:53:56 -0400 |
commit | 38d5f88a8183147cc5ecc6ece58fc28836a4af8b (patch) | |
tree | 5cc2f9f74cdf5be2e24541057b9cf488de8b7b61 /routers/api | |
parent | 7eace60bb6d3f11d418122bf98fc00e49ea9da36 (diff) | |
download | gitea-38d5f88a8183147cc5ecc6ece58fc28836a4af8b.tar.gz gitea-38d5f88a8183147cc5ecc6ece58fc28836a4af8b.zip |
Add X-Total-Count on /repos/{owner]/{repo}/pulls API (#11113)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/pull.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 86df3920c8..b23d502c6f 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -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) } |