about summary refs log tree commit diff
path: root/app/controllers/api/v1/accounts_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-29 21:28:21 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-29 21:28:21 +0200
commit927333f4f89403c5a6a2b421065112e517d88193 (patch)
tree1767e142ee9263b5b6968b5b43228ee0889232c5 /app/controllers/api/v1/accounts_controller.rb
parente4aebad35afae12f4b7503fb6c3783fcd3809761 (diff)
Improve code style
Diffstat (limited to 'app/controllers/api/v1/accounts_controller.rb')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index 23f48782f..50e6df80e 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -19,19 +19,19 @@ class Api::V1::AccountsController < ApiController
   end
 
   def follow
-    @follow = FollowService.new.(current_user.account, @account.acct)
+    @follow = FollowService.new.call(current_user.account, @account.acct)
     set_relationship
     render action: :relationship
   end
 
   def unfollow
-    @unfollow = UnfollowService.new.(current_user.account, @account)
+    @unfollow = UnfollowService.new.call(current_user.account, @account)
     set_relationship
     render action: :relationship
   end
 
   def relationships
-    ids = params[:id].is_a?(Enumerable) ? params[:id].map { |id| id.to_i } : [params[:id].to_i]
+    ids = params[:id].is_a?(Enumerable) ? params[:id].map(&:to_i) : [params[:id].to_i]
     @accounts    = Account.find(ids)
     @following   = Account.following_map(ids, current_user.account_id)
     @followed_by = Account.followed_by_map(ids, current_user.account_id)