Refactor routers directory (#15800)
* refactor routers directory * move func used for web and api to common * make corsHandler a function to prohibit side efects * rm unused func Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@ -14,7 +14,7 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/routers/routes"
|
||||
"code.gitea.io/gitea/routers"
|
||||
|
||||
"gitea.com/go-chi/session"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
@ -58,7 +58,7 @@ func TestSessionFileCreation(t *testing.T) {
|
||||
oldSessionConfig := setting.SessionConfig.ProviderConfig
|
||||
defer func() {
|
||||
setting.SessionConfig.ProviderConfig = oldSessionConfig
|
||||
c = routes.NormalRoutes()
|
||||
c = routers.NormalRoutes()
|
||||
}()
|
||||
|
||||
var config session.Options
|
||||
@ -84,7 +84,7 @@ func TestSessionFileCreation(t *testing.T) {
|
||||
|
||||
setting.SessionConfig.ProviderConfig = string(newConfigBytes)
|
||||
|
||||
c = routes.NormalRoutes()
|
||||
c = routers.NormalRoutes()
|
||||
|
||||
t.Run("NoSessionOnViewIssue", func(t *testing.T) {
|
||||
defer PrintCurrentTest(t)()
|
||||
|
Reference in New Issue
Block a user