<commit_before>
###### INDEX ######

get '/' do
  # two buttons: view all posts, add a post
  ### redirect to view for one button
  ### redirect to login

  # OR

  #display all Q w/ A and comments  => this allows use of 'before' for authentication
end


###### USERS ######

get '/user/login' do
  # what it says
end

get '/user/logout' do
  # optional
end

get '/user/new' do
  # generate and save new user
  # redirect to /view after
end


###### QUESTIONS & ANSWERS ######

get '/question' do
  # Show all questions
end

get '/question/:id' do
  # Show a question with its answers and comments
end


###### AUTHENTICATE ######

before '/question/*' do
  # check user authentication
  # This should check everything 'below' question
end


####### AUTHENTICATED Q & A ######

get '/question/add' do
  # get form to add new question
end

post '/question' do
  # create new Q object in DB
  # redirects /question
end

get '/question/:id/answer' do
  # gets form to add a new ans to the specific Q
end

post '/question/:id/answer' do
  # create new A object in DB
  # redirects to /question
end


###### COMMENTS ######

get '/question/:id/comment' do
  # gets form to add a new comment to the specific Q
end

post '/question/:question_id/comment/:id' do
  # create a new Q-comment obj in DB
  # redirects to /question
end

get '/question/:question_id/answer/:answer_id/comment' do
  # create a new A-comment obj in DB
  # redirects to /question
end

post '/question/:question_id/answer/:answer_id/comment/:id' do
  # create a new A-comment obj in DB
  # redirects to /question
end


###### VOTING ######

post '/question/:id/vote' do
  # creates a new vote on the question
end

post '/question/:question_id/answer/:id/vote' do
  # creates a new vote on the answer
end
<commit_msg>update routes in controller with casey's recommendations<commit_after>
###### INDEX ######

get '/' do
  # two buttons: view all posts, add a post
  ### redirect to view for one button
  ### redirect to login

  # OR

  #display all Q w/ A and comments  => this allows use of 'before' for authentication
end


###### USERS ######

get '/users/login' do
  # what it says
end

get '/users/logout' do
  # optional
end

get '/users/new' do
  # show the new user form
  # redirect to /view after
end

post '/users' do
  # send new user to database
  # redirect to /view after
end


###### QUESTIONS & ANSWERS ######

get '/questions' do
  # Show all questions
end

get '/questions/:id' do
  # Show a question with its answers and comments
end


###### AUTHENTICATE ######

# before '/questions/*' do            # Authenticate will show/hide edit not prevent access
#   # check user authentication
#   # This should check everything 'below' question
# end


####### AUTHENTICATED Q & A ######

get '/questions/new' do
  # get form to add new question
end

post '/questions' do
  # create new Q object in DB
  # redirects /question
end

# get '/questions/:id/answers' do
#   # gets form to add a new ans to the specific Q
# end

post '/questions/:id/answers' do
  # create new A object in DB
  # redirects to /question
end


###### COMMENTS ######

get '/questions/:id/comments/new' do
  # gets form to add a new comment to the specific Q
end

post '/questions/:question_id/comments' do
  # create a new Q-comment obj in DB
  # redirects to /question
end

# get '/questions/:question_id/answers/:answer_id/comments' do
#   # create a new A-comment obj in DB
#   # redirects to /question
# end

post '/questions/:question_id/answers/:answer_id/comments' do
  # create a new A-comment obj in DB
  # redirects to /question
end


###### VOTING ######

post '/questions/:id/votes' do
  # creates a new vote on the question
end

post '/questions/:question_id/answers/:id/votes' do
  # creates a new vote on the answer
end

{'fraction_non_alphanumeric': 0.1290577988915281, 'fraction_numerical': 0.0, 'mean_word_length': 3.1971207087486158, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2986574', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1206, 'n_words': 490}