You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: splits_controller.rb
    path of file: ./repos/splits-io/app/controllers/api/v4/runs
    
    the code of the file until where you have to start completion: class Api::V4::Runs::SplitsController < Api::V4::ApplicationController
  before_action :set_run
  before_action only: [:create] do
    doorkeeper_authorize! :upload_run
  end

  def create
    if @run.split(
      more:            params[:more] == '1',
      realtime_end_ms: split_params[:realtime_end_ms],
      gametime_end_ms: split_params[:gametime_end_ms],
    )
      render json: Api::V4::RunBlueprint
    
  def create
    if @run.split(
      more:            params[:more] == '1',
      realtime_end_ms: split_params[:realtime_end_ms],
      gametime_end_ms: split_params[:gametime_end_ms],
    )
      render json: Api::V4::RunBlueprint.render(
        @run,
        root:           :run,
        historic:       params[:historic] == '1',
        segment_groups: params[:segment_groups] == '1',
      )
    else
      render status: :bad_request, json: {
        status:  400,
        message: @run.errors.full_messages.to_sentence,
      }
    end