Move middlewares to web/middleware (#14480)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lunny Xiao 2021-01-30 16:55:53 +08:00 committed by GitHub
parent 0e0424c8ec
commit 5e20fd6dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 126 additions and 126 deletions

View file

@ -17,8 +17,8 @@ import (
"code.gitea.io/gitea/modules/auth/sso"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/middlewares"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/web/middleware"
"gitea.com/go-chi/session"
)
@ -224,7 +224,7 @@ func APIContexter() func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
var locale = middlewares.Locale(w, req)
var locale = middleware.Locale(w, req)
var ctx = APIContext{
Context: &Context{
Resp: NewResponse(w),