<commit_before>module Web
  class Routes < Sinatra::Base
    get '/' do
      'Hello world.'
    end
  end
end<commit_msg>add request routes to sinatra<commit_after>module Web
  class Routes < Sinatra::Base
    get '/' do
      erb :home, layout: :layout
    end

    get '/request' do
      erb :request, layout: :layout
    end

    post '/request' do
      if @new_user = create_api_user(params)
        erb :request_success, layout: :layout
      else
        erb :request_error, layout: :layout
      end
    end

    def create_api_user params
      ApiUser.create(
        email:      params['email'],
        full_name:  params['fullname'],
        company:    params['company'],
        reason:     params['reason'],
        active:     false
      )
    end
  end
end
{'fraction_non_alphanumeric': 0.09652509652509653, 'fraction_numerical': 0.0, 'mean_word_length': 2.075098814229249, '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': '1721637', 'n_tokens_mistral': 240, 'n_tokens_neox': 236, 'n_words': 69}