feat(app state): settings are now global and get updated on the fly
This commit is contained in:
@@ -40,8 +40,16 @@ func UpdateSetting(log *logger.CustomLogger, db *gorm.DB, id string, input Setti
|
||||
return settingUpdate.Error
|
||||
}
|
||||
|
||||
if err := Refresh(); err != nil {
|
||||
log.Error("There was an error refreshing the settings after a setting update", "settings", map[string]interface{}{
|
||||
"error": err,
|
||||
})
|
||||
}
|
||||
|
||||
log.Info("The setting was just updated", "settings", map[string]interface{}{
|
||||
"name": settingUpdate.Name,
|
||||
"id": id,
|
||||
"name": cfg.Name,
|
||||
"updated": updates,
|
||||
})
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user