diff --git a/lib/settings/database/database.go b/lib/settings/database/database.go index c0f43be3..47b0686c 100644 --- a/lib/settings/database/database.go +++ b/lib/settings/database/database.go @@ -123,9 +123,9 @@ func (config *Database) Init(params ...string) error { db.Unscoped().AutoMigrate(&Setting{}, &SettingDomain{}) } - config.data = map[string]map[string]generic.Value{} + config.data = make(map[string]map[string]generic.Value) - db.Find(&items) + db.Debug().Find(&items) for _, item := range items { item.Domain = strings.ToUpper(item.Domain) item.Name = strings.ToUpper(item.Name) @@ -135,7 +135,7 @@ func (config *Database) Init(params ...string) error { config.data[item.Domain][item.Name] = generic.Parse(item.Value) } var list []SettingDomain - db.Find(&list) + db.Debug().Find(&list) for idx, item := range list { domains[item.Domain] = list[idx] } diff --git a/lib/settings/settings.go b/lib/settings/settings.go index f6d8de74..188eee64 100644 --- a/lib/settings/settings.go +++ b/lib/settings/settings.go @@ -82,7 +82,7 @@ func AddDriver(driver Interface) { drivers = append(drivers, driver) var err = driver.Init() if err != nil { - log.Fatal("unable to initiate pub/sub driver", "name", driver.Name(), "error", err) + log.Fatal("unable to initiate config driver", "name", driver.Name(), "error", err) } } if defaultDriver == nil {