1
0
Fork 0
forked from forgejo/forgejo

add issue subscriber API

This commit is contained in:
6543 2019-10-29 11:17:45 +01:00
parent c4f9d06855
commit 06daf4e863
No known key found for this signature in database
GPG key ID: A1CA74D27FD13271
5 changed files with 378 additions and 0 deletions

View file

@ -688,6 +688,11 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/start", reqToken(), repo.StartIssueStopwatch)
m.Post("/stop", reqToken(), repo.StopIssueStopwatch)
})
m.Group("/subscriptions", func() {
m.Get("", reqToken(), bind(api.IssueWatchers{}), repo.GetIssueWatchers)
m.Put("/:user", reqToken(), repo.AddIssueSubscription)
m.Delete("/:user", reqToken(), repo.DelIssueSubscription)
})
})
}, mustEnableIssuesOrPulls)
m.Group("/labels", func() {