0
0
Fork 0

Fix /api/v1/accounts/update_credentials tests (#1357)

This commit is contained in:
Eugen 2017-04-09 20:23:14 +02:00 committed by GitHub
parent 43f955e31f
commit 15d442cf9d
3 changed files with 35 additions and 29 deletions

View file

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