diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-11 15:43:09 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-11 15:43:09 +0100 |
commit | e6408b2e7ade3dac8dcf14bcda5b5c6a159fa74c (patch) | |
tree | 7ba827f801bea1556231d275a6a8a35471f8a954 /app/controllers | |
parent | 0afed995ce60dec11bc7718f83ca5afde86f6228 (diff) | |
parent | 446aad4ce2cb7afd0ba8e4b508e4dcba57eac790 (diff) |
Merge branch 'feature-privacy-federation' into development
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/follow_requests_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/concerns/obfuscate_filename.rb | 1 |
2 files changed, 3 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 diff --git a/app/controllers/concerns/obfuscate_filename.rb b/app/controllers/concerns/obfuscate_filename.rb index 9f12cb7e9..dde7ce8c6 100644 --- a/app/controllers/concerns/obfuscate_filename.rb +++ b/app/controllers/concerns/obfuscate_filename.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module ObfuscateFilename extend ActiveSupport::Concern |