<commit_before>#THIS IS A CASH GAME SESSION CONTROLLER, NOT A SESSION FOR A BROWSER!

class SessionsController < ApplicationController

  get '/sessions' do
    erb :'sessions/sessions'
  end

  get '/sessions/new' do
    if !logged_in?
      redirect '/'
    else
      erb :'sessions/new'
    end
  end

  post 'sessions' do

  end



end
<commit_msg>created post route to create an instance of a session, and enter it into the database<commit_after>#THIS IS A CASH GAME SESSION CONTROLLER, NOT A SESSION FOR A BROWSER!

class SessionsController < ApplicationController

  get '/sessions' do
    erb :'sessions/sessions'
  end

  get '/sessions/new' do
    if !logged_in?
      redirect '/'
    else
      erb :'sessions/new'
    end
  end

  post '/sessions' do
    if params[:date] == "" || params[:amount_won] == ""
      redirect '/sessions/new'
    else
      @session = Session.create(params)
      redirect "/sessions/#{@session.id}"
    end
  end

  get '/sessions/:id' do
    @session = Session.find(params[:id])
    erb :'sessions/show'
  end



end

{'fraction_non_alphanumeric': 0.10451977401129943, 'fraction_numerical': 0.0, 'mean_word_length': 2.756183745583039, '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': '5309649', 'n_tokens_mistral': 377, 'n_tokens_neox': 357, 'n_words': 110}