diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index bb7cda035..2c44e36a7 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -17,10 +17,8 @@ class Api::V1::AccountsController < ApiController end def update_credentials - @account = current_user.account - - @account.update_attributes!(account_params) - + current_account.update!(account_params) + @account = current_account render action: :show end @@ -146,6 +144,6 @@ class Api::V1::AccountsController < ApiController end def account_params - @account_params ||= params.permit(:display_name, :note, :avatar, :header) + params.permit(:display_name, :note, :avatar, :header) end end |