summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_reaction.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/issue_reaction.go')
-rw-r--r--routers/api/v1/repo/issue_reaction.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/api/v1/repo/issue_reaction.go b/routers/api/v1/repo/issue_reaction.go
index d0ba8dac65..6184ea71f0 100644
--- a/routers/api/v1/repo/issue_reaction.go
+++ b/routers/api/v1/repo/issue_reaction.go
@@ -67,9 +67,9 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
return
}
- reactions, err := models.FindCommentReactions(comment)
+ reactions, _, err := models.FindCommentReactions(comment)
if err != nil {
- ctx.Error(http.StatusInternalServerError, "FindIssueReactions", err)
+ ctx.Error(http.StatusInternalServerError, "FindCommentReactions", err)
return
}
_, err = reactions.LoadUsers(ctx.Repo.Repository)
@@ -285,7 +285,7 @@ func GetIssueReactions(ctx *context.APIContext) {
return
}
- reactions, err := models.FindIssueReactions(issue, utils.GetListOptions(ctx))
+ reactions, count, err := models.FindIssueReactions(issue, utils.GetListOptions(ctx))
if err != nil {
ctx.Error(http.StatusInternalServerError, "FindIssueReactions", err)
return
@@ -305,6 +305,7 @@ func GetIssueReactions(ctx *context.APIContext) {
})
}
+ ctx.SetTotalCountHeader(count)
ctx.JSON(http.StatusOK, result)
}