Config: Refactor frontend settings to struct (#61990)

* Config: Make frontend settings a struct rather than map

remove frontend settings to setting package

remove frontend settings struct to dtos package

rearrange structs to avoid cycles

rename getFrontendSettings fn

omitempty

fix login test

fix middleware test

* wip some enterprise types

* cleanup, moved structs from enterprise

* ci
This commit is contained in:
Josh Hunt
2023-01-31 19:14:15 +00:00
committed by GitHub
parent 178f290f0c
commit 138575cbe9
10 changed files with 383 additions and 150 deletions

View File

@ -167,7 +167,7 @@ func TestMiddlewareContext(t *testing.T) {
t.Log("Handler called")
data := &dtos.IndexViewData{
User: &dtos.CurrentUser{},
Settings: map[string]interface{}{},
Settings: &dtos.FrontendSettingsDTO{},
NavTree: &navtree.NavTreeRoot{},
}
t.Log("Calling HTML", "data", data)