From 7c24ae37b8393551505b272030e0117bb03b24cb Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 29 Oct 2019 16:27:44 +0100 Subject: [PATCH] without "reqToken()" api works ... * should be still secure beause ctx.user has to be there or nothing will hapen --- routers/api/v1/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index d5889dd54a..1ef99fdc95 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -689,9 +689,9 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/stop", reqToken(), repo.StopIssueStopwatch) }) m.Group("/subscriptions", func() { - m.Get("", reqToken(), bind(api.User{}), repo.GetIssueWatchers) - m.Put("/:user", reqToken(), repo.AddIssueSubscription) - m.Delete("/:user", reqToken(), repo.DelIssueSubscription) + m.Get("", bind(api.User{}), repo.GetIssueWatchers) + m.Put("/:user", repo.AddIssueSubscription) + m.Delete("/:user", repo.DelIssueSubscription) }) }) }, mustEnableIssuesOrPulls)