module Zuma
  class IsBlockingController < Zuma::BaseController
    before_action :set_user, :set_blocked_user, only: [:index]

    def index
      authorize UserBlock
      @user_block = if @twitch_user.present? && @blocked_user.present?
                      UserBlock.find(@twitch_user.id, @blocked_user.id)
                    else
                      UserBlock.new
                    end
    end
  end
end
