summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/status.go')
-rw-r--r--routers/api/v1/repo/status.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go
index 841f60bb56..b884432f73 100644
--- a/routers/api/v1/repo/status.go
+++ b/routers/api/v1/repo/status.go
@@ -204,8 +204,7 @@ func getCommitStatuses(ctx *context.APIContext, sha string) {
}
ctx.SetLinkHeader(int(maxResults), listOptions.PageSize)
- ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults))
- ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link")
+ ctx.SetTotalCountHeader(maxResults)
ctx.JSON(http.StatusOK, apiStatuses)
}
@@ -267,5 +266,6 @@ func GetCombinedCommitStatusByRef(ctx *context.APIContext) {
combiStatus := convert.ToCombinedStatus(statuses, convert.ToRepo(repo, ctx.Repo.AccessMode))
+ // TODO: ctx.SetTotalCountHeader(count)
ctx.JSON(http.StatusOK, combiStatus)
}