From 1bcbc0204530fd3f7b0930ed13306d794733843c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 25 Oct 2019 05:07:13 +0800 Subject: [PATCH] Revert "API should follow RequireSignInView (#8654) (#8661)" (#8674) This reverts commit ffff835b7338a25be96df8747a336f07afc49db2. --- routers/api/v1/api.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 3451cd5e8ad..363379381ad 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) {} -}