feat(app state): settings are now global and get updated on the fly

This commit is contained in:
2025-08-05 12:40:34 -05:00
parent 2473bfa702
commit c7af1901aa
5 changed files with 245 additions and 46 deletions

View File

@@ -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