Initial Baby Step to refactoring settings from global vars to instance (#11777)
* wip: start on refactoring settings * settings: progress on settings refactor * refactor: progress on settings refactoring * fix: fixed failing test * settings: moved smtp settings from global to instance
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ import (
|
||||
func AdminGetSettings(c *m.ReqContext) {
|
||||
settings := make(map[string]interface{})
|
||||
|
||||
for _, section := range setting.Cfg.Sections() {
|
||||
for _, section := range setting.Raw.Sections() {
|
||||
jsonSec := make(map[string]interface{})
|
||||
settings[section.Name()] = jsonSec
|
||||
|
||||
|
||||
@@ -35,9 +35,10 @@ type HTTPServer struct {
|
||||
context context.Context
|
||||
streamManager *live.StreamManager
|
||||
cache *gocache.Cache
|
||||
RouteRegister RouteRegister `inject:""`
|
||||
httpSrv *http.Server
|
||||
|
||||
httpSrv *http.Server
|
||||
RouteRegister RouteRegister `inject:""`
|
||||
Bus bus.Bus `inject:""`
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) Init() {
|
||||
|
||||
Reference in New Issue
Block a user