Browse Source

without "reqToken()" api works ...

* should be still secure beause ctx.user has to be there or nothing will hapen
pull/8729/head
6543 6 years ago
parent
commit
7c24ae37b8
No known key found for this signature in database
GPG Key ID: A1CA74D27FD13271
  1. 6
      routers/api/v1/api.go

6
routers/api/v1/api.go

@ -689,9 +689,9 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/stop", reqToken(), repo.StopIssueStopwatch) m.Post("/stop", reqToken(), repo.StopIssueStopwatch)
}) })
m.Group("/subscriptions", func() { m.Group("/subscriptions", func() {
m.Get("", reqToken(), bind(api.User{}), repo.GetIssueWatchers) m.Get("", bind(api.User{}), repo.GetIssueWatchers)
m.Put("/:user", reqToken(), repo.AddIssueSubscription) m.Put("/:user", repo.AddIssueSubscription)
m.Delete("/:user", reqToken(), repo.DelIssueSubscription) m.Delete("/:user", repo.DelIssueSubscription)
}) })
}) })
}, mustEnableIssuesOrPulls) }, mustEnableIssuesOrPulls)

Loading…
Cancel
Save