remove global refs from api/api4 (#7496)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
e0d5703f72
Коммит
dcf9e96a0b
@@ -81,10 +81,10 @@ func runServer(configFileLocation string) {
|
||||
}
|
||||
|
||||
wsapi.InitRouter()
|
||||
api4.InitApi(a.Srv.Router, false)
|
||||
api.InitApi(a.Srv.Router)
|
||||
api4.Init(a, a.Srv.Router, false)
|
||||
api3 := api.Init(a, a.Srv.Router)
|
||||
wsapi.InitApi()
|
||||
web.InitWeb()
|
||||
web.Init(api3)
|
||||
|
||||
if !utils.IsLicensed() && len(utils.Cfg.SqlSettings.DataSourceReplicas) > 1 {
|
||||
l4g.Warn(utils.T("store.sql.read_replicas_not_licensed.critical"))
|
||||
@@ -108,7 +108,7 @@ func runServer(configFileLocation string) {
|
||||
|
||||
// If we allow testing then listen for manual testing URL hits
|
||||
if utils.Cfg.ServiceSettings.EnableTesting {
|
||||
manualtesting.InitManualTesting()
|
||||
manualtesting.Init(api3)
|
||||
}
|
||||
|
||||
setDiagnosticId(a)
|
||||
|
||||
@@ -53,8 +53,8 @@ func webClientTestsCmdF(cmd *cobra.Command, args []string) error {
|
||||
utils.InitTranslations(utils.Cfg.LocalizationSettings)
|
||||
a.Srv.Router = api.NewRouter()
|
||||
wsapi.InitRouter()
|
||||
api4.InitApi(a.Srv.Router, false)
|
||||
api.InitApi(a.Srv.Router)
|
||||
api4.Init(a, a.Srv.Router, false)
|
||||
api.Init(a, a.Srv.Router)
|
||||
wsapi.InitApi()
|
||||
setupClientTests()
|
||||
a.StartServer()
|
||||
@@ -73,8 +73,8 @@ func serverForWebClientTestsCmdF(cmd *cobra.Command, args []string) error {
|
||||
utils.InitTranslations(utils.Cfg.LocalizationSettings)
|
||||
a.Srv.Router = api.NewRouter()
|
||||
wsapi.InitRouter()
|
||||
api4.InitApi(a.Srv.Router, false)
|
||||
api.InitApi(a.Srv.Router)
|
||||
api4.Init(a, a.Srv.Router, false)
|
||||
api.Init(a, a.Srv.Router)
|
||||
wsapi.InitApi()
|
||||
setupClientTests()
|
||||
a.StartServer()
|
||||
|
||||
Ссылка в новой задаче
Block a user