Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Nov 29, 2023
1 parent 3861a9b commit a33f039
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/settings/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
}
Expand Down
2 changes: 1 addition & 1 deletion lib/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a33f039

Please sign in to comment.