about summary refs log tree commit diff
path: root/app/controllers/api/follows_controller.rb
blob: 604e655656333ddd9479e30275eb1cf0f2a1045a (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

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