about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authormasarakki <masaki182@gmail.com>2017-08-26 19:40:03 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-26 12:40:03 +0200
commit649a20ab46eadf9ae3bfc30782ae62379383bd72 (patch)
treef5a2f8633b8e611a55c146c92538f64c45b6618d /app/controllers/api
parent3ac7b353f8ba74bce9e20974bcc1832930424ef2 (diff)
authorize-follow-requests-after-unlocking (#4658)
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts/credentials_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts/credentials_controller.rb b/app/controllers/api/v1/accounts/credentials_controller.rb
index bea83cd2a..da534d960 100644
--- a/app/controllers/api/v1/accounts/credentials_controller.rb
+++ b/app/controllers/api/v1/accounts/credentials_controller.rb
@@ -12,7 +12,7 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
 
   def update
     @account = current_account
-    @account.update!(account_params)
+    UpdateAccountService.new.call(@account, account_params, raise_error: true)
     ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
     render json: @account, serializer: REST::CredentialAccountSerializer
   end