about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index 850d00d2e..930f60cc3 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -24,13 +24,25 @@ class Api::V1::AccountsController < ApiController
   end
 
   def follow
-    @follow = FollowService.new.call(current_user.account, @account.acct)
+    FollowService.new.call(current_user.account, @account.acct)
+    set_relationship
+    render action: :relationship
+  end
+
+  def block
+    BlockService.new.call(current_user.account, @account)
     set_relationship
     render action: :relationship
   end
 
   def unfollow
-    @unfollow = UnfollowService.new.call(current_user.account, @account)
+    UnfollowService.new.call(current_user.account, @account)
+    set_relationship
+    render action: :relationship
+  end
+
+  def unblock
+    UnblockService.new.call(current_user.account, @account)
     set_relationship
     render action: :relationship
   end