diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/accounts/credentials_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/auth/confirmations_controller.rb | 12 | ||||
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/app/controllers/api/v1/accounts/credentials_controller.rb b/app/controllers/api/v1/accounts/credentials_controller.rb index 259d07be8..2d0737ee4 100644 --- a/app/controllers/api/v1/accounts/credentials_controller.rb +++ b/app/controllers/api/v1/accounts/credentials_controller.rb @@ -32,6 +32,7 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController { 'setting_default_privacy' => source_params.fetch(:privacy, @account.user.setting_default_privacy), 'setting_default_sensitive' => source_params.fetch(:sensitive, @account.user.setting_default_sensitive), + 'setting_default_language' => source_params.fetch(:language, @account.user.setting_default_language), } end end diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index f3e0ae257..de0fcd3e3 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -6,18 +6,12 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController before_action :set_user, only: [:finish_signup] before_action :set_pack - private - - def set_pack - use_pack 'auth' - end - # GET/PATCH /users/:id/finish_signup def finish_signup return unless request.patch? && params[:user] if @user.update(user_params) @user.skip_reconfirmation! - sign_in(@user, bypass: true) + bypass_sign_in(@user) redirect_to root_path, notice: I18n.t('devise.confirmations.send_instructions') else @show_errors = true @@ -26,6 +20,10 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController private + def set_pack + use_pack 'auth' + end + def set_user @user = current_user end diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 425664d49..4733170dc 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -23,7 +23,7 @@ class Settings::PreferencesController < Settings::BaseController def user_params params.require(:user).permit( :locale, - filtered_languages: [] + chosen_languages: [] ) end @@ -31,6 +31,7 @@ class Settings::PreferencesController < Settings::BaseController params.require(:user).permit( :setting_default_privacy, :setting_default_sensitive, + :setting_default_language, :setting_unfollow_modal, :setting_boost_modal, :setting_favourite_modal, |