1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Add reactions to issues/PR and comments (#2856)

This commit is contained in:
Lauris BH
2017-12-04 01:14:26 +02:00
committed by GitHub
parent e59adcde65
commit 5dc37b187c
24 changed files with 677 additions and 8 deletions

View File

@@ -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)