aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/label.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/org/label.go')
-rw-r--r--routers/api/v1/org/label.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/api/v1/org/label.go b/routers/api/v1/org/label.go
index c70252158e..09acb0bf04 100644
--- a/routers/api/v1/org/label.go
+++ b/routers/api/v1/org/label.go
@@ -49,6 +49,13 @@ func ListLabels(ctx *context.APIContext) {
return
}
+ count, err := models.CountLabelsByOrgID(ctx.Org.Organization.ID)
+ if err != nil {
+ ctx.InternalServerError(err)
+ return
+ }
+
+ ctx.SetTotalCountHeader(count)
ctx.JSON(http.StatusOK, convert.ToLabelList(labels))
}