about summary refs log tree commit diff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-06 23:26:16 +0200
committerGitHub <noreply@github.com>2019-07-06 23:26:16 +0200
commit23aeef52cc4540b4514e9f3b935b21f0530a3746 (patch)
tree451fec4c4b674063597ee4911ce08fd1e624d74f /app/controllers/api/v1
parentc07cca4727041ea5a5721acbc603d4bfb45a15a6 (diff)
Remove Salmon and PubSubHubbub (#11205)
* Remove Salmon and PubSubHubbub endpoints

* Add error when trying to follow OStatus accounts

* Fix new accounts not being created in ResolveAccountService
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/follows_controller.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/app/controllers/api/v1/follows_controller.rb b/app/controllers/api/v1/follows_controller.rb
deleted file mode 100644
index 5420c0533..000000000
--- a/app/controllers/api/v1/follows_controller.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class Api::V1::FollowsController < Api::BaseController
-  before_action -> { doorkeeper_authorize! :follow, :'write:follows' }
-  before_action :require_user!
-
-  respond_to :json
-
-  def create
-    raise ActiveRecord::RecordNotFound if follow_params[:uri].blank?
-
-    @account = FollowService.new.call(current_user.account, target_uri).try(:target_account)
-
-    if @account.nil?
-      username, domain = target_uri.split('@')
-      @account         = Account.find_remote!(username, domain)
-    end
-
-    render json: @account, serializer: REST::AccountSerializer
-  end
-
-  private
-
-  def target_uri
-    follow_params[:uri].strip.gsub(/\A@/, '')
-  end
-
-  def follow_params
-    params.permit(:uri)
-  end
-end