<commit_before>class ApiV1::InvitationsController < ApiV1::APIController
  before_filter :load_target
  before_filter :load_invite, :except => [:index]
  
  def index
    authorize! :admin, @target
    @invitations = @target.invitations.all(:conditions => api_range,
                                           :limit => api_limit,
                                           :order => 'id DESC')
    
    api_respond @invitations, :include => [:project, :user], :references => [:project, :user]
  end

  def show
    authorize! :admin, @target
    api_respond @invitation, :include => [:project, :user]<commit_msg>Dont load invites on create for the api<commit_after>class ApiV1::InvitationsController < ApiV1::APIController
  before_filter :load_target
  before_filter :load_invite, :except => [:index, :create]
  
  def index
    authorize! :admin, @target
    @invitations = @target.invitations.all(:conditions => api_range,
                                           :limit => api_limit,
                                           :order => 'id DESC')
    
    api_respond @invitations, :include => [:project, :user], :references => [:project, :user]
  end

  def show
    authorize! :admin, @target
    api_respond @invitation, :include => [:project, :user]
{'fraction_non_alphanumeric': 0.11895321173671689, 'fraction_numerical': 0.0031720856463124504, 'mean_word_length': 2.4958448753462603, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7550764', 'n_tokens_mistral': 356, 'n_tokens_neox': 360, 'n_words': 89}