API issue_subscripton: Put/Delete require tocken

This commit is contained in:
6543 2019-11-04 18:08:32 +01:00
parent 717237a91e
commit 52cc73b14b
No known key found for this signature in database
GPG key ID: A1CA74D27FD13271

View file

@ -692,8 +692,8 @@ func RegisterRoutes(m *macaron.Macaron) {
}) })
m.Group("/subscriptions", func() { m.Group("/subscriptions", func() {
m.Get("", bind(api.User{}), repo.GetIssueSubscribers) m.Get("", bind(api.User{}), repo.GetIssueSubscribers)
m.Put("/:user", repo.AddIssueSubscription) m.Put("/:user", reqToken(), repo.AddIssueSubscription)
m.Delete("/:user", repo.DelIssueSubscription) m.Delete("/:user", reqToken(), repo.DelIssueSubscription)
}) })
}) })
}, mustEnableIssuesOrPulls) }, mustEnableIssuesOrPulls)