about summary refs log tree commit diff
path: root/app/controllers/api/v1/follows_controller.rb
blob: de006f6712c7b94f89bb4bb22c9bbb325d724a0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Api::V1::FollowsController < ApiController
  before_action :doorkeeper_authorize!
  respond_to    :json

  def create
    if params[:uri].blank?
      raise ActiveRecord::RecordNotFound
    end

    @account = FollowService.new.(current_user.account, params[:uri]).try(:target_account)
    render action: :show
  end
end