mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Add account data enrichment (#1532)
* Add data enrichment * Make data enrichment optional for self-hosters * Add categories to data enrichment * Only update category and merchant if nil * Fix name overrides * Lint fixes
This commit is contained in:
@@ -26,6 +26,10 @@ class Settings::HostingsController < SettingsController
|
||||
Setting.synth_api_key = hosting_params[:synth_api_key]
|
||||
end
|
||||
|
||||
if hosting_params.key?(:data_enrichment_enabled)
|
||||
Setting.data_enrichment_enabled = hosting_params[:data_enrichment_enabled]
|
||||
end
|
||||
|
||||
redirect_to settings_hosting_path, notice: t(".success")
|
||||
rescue ActiveRecord::RecordInvalid => error
|
||||
flash.now[:alert] = t(".failure")
|
||||
@@ -34,7 +38,7 @@ class Settings::HostingsController < SettingsController
|
||||
|
||||
private
|
||||
def hosting_params
|
||||
params.require(:setting).permit(:render_deploy_hook, :upgrades_setting, :require_invite_for_signup, :synth_api_key)
|
||||
params.require(:setting).permit(:render_deploy_hook, :upgrades_setting, :require_invite_for_signup, :synth_api_key, :data_enrichment_enabled)
|
||||
end
|
||||
|
||||
def raise_if_not_self_hosted
|
||||
|
||||
Reference in New Issue
Block a user