<commit_before>class Api::V1::SubjectsController < Api::ApiController
  include Versioned

  require_authentication :update, :create, :destroy, :version, :versions,
    scopes: [:subject]
  resource_actions :default
  schema_type :json_schema

  alias_method :subject, :controlled_resource

  before_action :check_subject_limit, only: :create

  def index
    case params[:sort]
    when 'queued'
      non_filterable_params = params.except(:project_id, :collection_id)
      render json_api: SubjectSerializer.page(non_filterable_params, *selector.get_subjects)
    else
      super
    end
  end

  private

  def check_subject_limit
    if api_user.above_subject_limit?
      current, max = api_user.subject_limits
      raise Api::LimitExceeded, "User has uploaded #{current} subjects of #{max} maximum"
    end
  end<commit_msg>Removido chequeo de límite de subjects a subir<commit_after>class Api::V1::SubjectsController < Api::ApiController
  include Versioned

  require_authentication :update, :create, :destroy, :version, :versions,
    scopes: [:subject]
  resource_actions :default
  schema_type :json_schema

  alias_method :subject, :controlled_resource

 # before_action :check_subject_limit, only: :create

  def index
    case params[:sort]
    when 'queued'
      non_filterable_params = params.except(:project_id, :collection_id)
      render json_api: SubjectSerializer.page(non_filterable_params, *selector.get_subjects)
    else
      super
    end
  end

  private

  def check_subject_limit
    if api_user.above_subject_limit?
      current, max = api_user.subject_limits
      raise Api::LimitExceeded, "User has uploaded #{current} subjects of #{max} maximum"
    end
  end
{'fraction_non_alphanumeric': 0.08058823529411764, 'fraction_numerical': 0.001176470588235294, 'mean_word_length': 4.382911392405063, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4814248', 'n_tokens_mistral': 527, 'n_tokens_neox': 512, 'n_words': 128}