We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a25081f commit ecb4ae6Copy full SHA for ecb4ae6
routers/api/v1/repo/git_ref.go
@@ -76,6 +76,7 @@ func GetGitRefs(ctx *context.APIContext) {
76
}
77
78
func getGitRefsInternal(ctx *context.APIContext, filter string) {
79
+ listOptions := utils.GetListOptions(ctx)
80
refs, lastMethodName, err := utils.GetGitRefs(ctx, filter)
81
if err != nil {
82
ctx.APIErrorInternal(fmt.Errorf("%s: %w", lastMethodName, err))
@@ -104,5 +105,7 @@ func getGitRefsInternal(ctx *context.APIContext, filter string) {
104
105
ctx.JSON(http.StatusOK, &apiRefs[0])
106
return
107
108
+ ctx.SetLinkHeader(len(apiRefs), listOptions.PageSize)
109
+ ctx.SetTotalCountHeader(int64(len(apiRefs)))
110
ctx.JSON(http.StatusOK, &apiRefs)
111
0 commit comments