diff options
Diffstat (limited to 'app/controllers/api/v1/follows_controller.rb')
-rw-r--r-- | app/controllers/api/v1/follows_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/api/v1/follows_controller.rb b/app/controllers/api/v1/follows_controller.rb index de006f671..f688f2e72 100644 --- a/app/controllers/api/v1/follows_controller.rb +++ b/app/controllers/api/v1/follows_controller.rb @@ -3,11 +3,9 @@ class Api::V1::FollowsController < ApiController respond_to :json def create - if params[:uri].blank? - raise ActiveRecord::RecordNotFound - end + raise ActiveRecord::RecordNotFound if params[:uri].blank? - @account = FollowService.new.(current_user.account, params[:uri]).try(:target_account) + @account = FollowService.new.call(current_user.account, params[:uri]).try(:target_account) render action: :show end end |