1
0
Fork 0
forked from forgejo/forgejo

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)