2016-09-27 23:58:23 +09:00
|
|
|
class Api::V1::FollowsController < ApiController
|
2016-10-23 02:38:47 +09:00
|
|
|
before_action -> { doorkeeper_authorize! :follow }
|
2016-03-07 20:42:33 +09:00
|
|
|
respond_to :json
|
|
|
|
|
|
|
|
def create
|
2016-09-30 04:28:21 +09:00
|
|
|
raise ActiveRecord::RecordNotFound if params[:uri].blank?
|
2016-09-13 02:20:55 +09:00
|
|
|
|
2016-10-06 23:36:16 +09:00
|
|
|
@account = FollowService.new.call(current_user.account, params[:uri].strip).try(:target_account)
|
2016-03-07 20:42:33 +09:00
|
|
|
render action: :show
|
|
|
|
end
|
|
|
|
end
|