summaryrefslogtreecommitdiffstats
path: root/routers/routes
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-12-04 01:14:26 +0200
committerGitHub <noreply@github.com>2017-12-04 01:14:26 +0200
commit5dc37b187c8b839a15ff73758799f218ddeb3bc9 (patch)
treeb63e5ca72c7b9e72c79408ace82dfcba992b5793 /routers/routes
parente59adcde655aac0e8afd3249407c9a0a2b1b1d6b (diff)
downloadgitea-5dc37b187c8b839a15ff73758799f218ddeb3bc9.tar.gz
gitea-5dc37b187c8b839a15ff73758799f218ddeb3bc9.zip
Add reactions to issues/PR and comments (#2856)
Diffstat (limited to 'routers/routes')
-rw-r--r--routers/routes/routes.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index 56d4b5393b..f4fb135629 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -495,6 +495,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/cancel", repo.CancelStopwatch)
})
})
+ m.Post("/reactions/:action", bindIgnErr(auth.ReactionForm{}), repo.ChangeIssueReaction)
})
m.Post("/labels", reqRepoWriter, repo.UpdateIssueLabel)
@@ -505,6 +506,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/comments/:id", func() {
m.Post("", repo.UpdateCommentContent)
m.Post("/delete", repo.DeleteComment)
+ m.Post("/reactions/:action", bindIgnErr(auth.ReactionForm{}), repo.ChangeCommentReaction)
}, context.CheckAnyUnit(models.UnitTypeIssues, models.UnitTypePullRequests))
m.Group("/labels", func() {
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)