Skip to content

Commit 1bcbc02

Browse files
lunnyzeripath
authored andcommitted
Revert "API should follow RequireSignInView (#8654) (#8661)" (#8674)
This reverts commit ffff835.
1 parent 66ceee0 commit 1bcbc02

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

routers/api/v1/api.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ func RegisterRoutes(m *macaron.Macaron) {
845845
m.Group("/topics", func() {
846846
m.Get("/search", repo.TopicSearch)
847847
})
848-
}, securityHeaders(), reqTokenBySetting(), context.APIContexter(), sudo())
848+
}, securityHeaders(), context.APIContexter(), sudo())
849849
}
850850

851851
func securityHeaders() macaron.Handler {
@@ -857,10 +857,3 @@ func securityHeaders() macaron.Handler {
857857
})
858858
}
859859
}
860-
861-
func reqTokenBySetting() macaron.Handler {
862-
if setting.Service.RequireSignInView {
863-
return reqToken()
864-
}
865-
return func(ctx *macaron.Context) {}
866-
}

0 commit comments

Comments
 (0)