about summary refs log tree commit diff
path: root/app/controllers/api/follows_controller.rb
blob: dbd44cc546d2e95f4439005aa439b0fc2f64002b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Api::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