about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-11 02:12:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-11 02:58:00 +0100
commit149887a0ffc81b588520ff82ab9fda8dff7bce6c (patch)
treefc1ba51d91fbadf729241381a8c46643121ad99f /app/controllers/api
parentd551e43a9bc35b4785285e78f5ecd3157636b447 (diff)
Make follow requests federate
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/follow_requests_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/follow_requests_controller.rb b/app/controllers/api/v1/follow_requests_controller.rb
index a30e97e71..740083735 100644
--- a/app/controllers/api/v1/follow_requests_controller.rb
+++ b/app/controllers/api/v1/follow_requests_controller.rb
@@ -18,12 +18,12 @@ class Api::V1::FollowRequestsController < ApiController
   end
 
   def authorize
-    FollowRequest.find_by!(account_id: params[:id], target_account: current_account).authorize!
+    AuthorizeFollowService.new.call(Account.find(params[:id]), current_account)
     render_empty
   end
 
   def reject
-    FollowRequest.find_by!(account_id: params[:id], target_account: current_account).reject!
+    RejectFollowService.new.call(Account.find(params[:id]), current_account)
     render_empty
   end
 end