* Rename SiteConfig * More renaming * Update spec * Update mandatory settings mapping * More renaming * e2e test fixes * You have a rename, and you have a rename * Spec fix * More changes * Temporarily disable specs * After-merge update * Undo rename for migration * undo rename of DUS * Fix DUS * Fix merge problem * Remove redundant DUS * Fix specs * Remove unused code * Change wrong class name * More cleanup * Re-add missing values to constant * Fix constant * Fix spec * Remove obsolete fields * Add accidentally removed field * Update spec * Move methods from Settings::General to ForemInstance * Remove unneeded model * Change mentions of 'site config'
16 lines
490 B
Ruby
16 lines
490 B
Ruby
module Admin
|
|
class ConfigsController < Admin::SettingsController
|
|
include SettingsParams
|
|
|
|
def create
|
|
result = ::Settings::Upsert.call(settings_params)
|
|
if result.success?
|
|
Audit::Logger.log(:internal, current_user, params.dup)
|
|
bust_content_change_caches
|
|
redirect_to admin_config_path, notice: "Successfully updated settings."
|
|
else
|
|
redirect_to admin_config_path, alert: "😭 #{result.errors.to_sentence}"
|
|
end
|
|
end
|
|
end
|
|
end
|