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

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

No files matched your search

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