<commit_before>class Api::V1::StagingController < ApiController
  before_action :set_event, except: [:get_event, :post_event_course_org]
  before_action :find_or_initialize_event, only: [:get_event, :post_event_course_org]
  before_action :authorize_event

  # GET /api/v1/staging/:staging_id/get_countries
  def get_countries
    render json: {countries: Geodata.standard_countries_subregions}
  end

  # Returns the event and its related organization and efforts,
  # together with a course id and a list of split ids.
  # To get course and split information, use
  # GET /api/v1/courses/:id

  # GET /api/v1/staging/:staging_id/get_event
  def get_event
    @event.course.splits.load
    render json: @event, serializer: EventSerializer, include: %w(course efforts)
  end
<commit_msg>Update StagingController#get_event to include splits.<commit_after>class Api::V1::StagingController < ApiController
  before_action :set_event, except: [:get_event, :post_event_course_org]
  before_action :find_or_initialize_event, only: [:get_event, :post_event_course_org]
  before_action :authorize_event

  # GET /api/v1/staging/:staging_id/get_countries
  def get_countries
    render json: {countries: Geodata.standard_countries_subregions}
  end

  # Returns the event and its related organization and efforts,
  # together with a course id and a list of split ids.
  # To get course and split information, use
  # GET /api/v1/courses/:id

  # GET /api/v1/staging/:staging_id/get_event
  def get_event
    @event.course.splits.load
    render json: @event, serializer: EventSerializer, include: %w(course efforts course.splits)
  end

{'fraction_non_alphanumeric': 0.0866093366093366, 'fraction_numerical': 0.004914004914004914, 'mean_word_length': 4.9021739130434785, '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': '2391633', 'n_tokens_mistral': 540, 'n_tokens_neox': 540, 'n_words': 139}