<commit_before>get '/home' do #RESTfully /videos
  @videos = Video.all
  erb :index
end

get '/videos/new' do
  erb :"videos/new"
end

get '/videos/:id' do
  @video = Video.find(params[:id])

  erb :"videos/show"
end

post '/videos' do
  embed_url = convert_url(params[:video_url])<commit_msg>Add like counter for ajaxing<commit_after>get '/home' do #RESTfully /videos
  @videos = Video.all
  erb :index
end

get '/videos/new' do
  erb :"videos/new"
end

get '/videos/:id' do
  @video = Video.find(params[:id])

  erb :"videos/show"
end

get '/videos/:id/like' do
  video = Video.find(params[:id])
  video.likes.create(value: 1)

  content_type :json
  {like_count: video.likes.count}.to_json
end

post '/videos' do
  embed_url = convert_url(params[:video_url])
{'fraction_non_alphanumeric': 0.15374507227332457, 'fraction_numerical': 0.001314060446780552, 'mean_word_length': 3.980392156862745, 'pattern_counts': {'":': 0, '<': 3, '<?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': '778525', 'n_tokens_mistral': 329, 'n_tokens_neox': 309, 'n_words': 73}