diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-25 05:07:13 +0800 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-24 22:07:13 +0100 |
commit | 1bcbc0204530fd3f7b0930ed13306d794733843c (patch) | |
tree | 096dfc29df8c109d418bed52b71cff3e30504eec | |
parent | 66ceee08dcbad366761c10e8dee8f3d8624092bd (diff) | |
download | gitea-1bcbc0204530fd3f7b0930ed13306d794733843c.tar.gz gitea-1bcbc0204530fd3f7b0930ed13306d794733843c.zip |
Revert "API should follow RequireSignInView (#8654) (#8661)" (#8674)
This reverts commit ffff835b7338a25be96df8747a336f07afc49db2.
-rw-r--r-- | routers/api/v1/api.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 3451cd5e8a..363379381a 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -845,7 +845,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/topics", func() { m.Get("/search", repo.TopicSearch) }) - }, securityHeaders(), reqTokenBySetting(), context.APIContexter(), sudo()) + }, securityHeaders(), context.APIContexter(), sudo()) } func securityHeaders() macaron.Handler { @@ -857,10 +857,3 @@ func securityHeaders() macaron.Handler { }) } } - -func reqTokenBySetting() macaron.Handler { - if setting.Service.RequireSignInView { - return reqToken() - } - return func(ctx *macaron.Context) {} -} |