<commit_before>require 'api_constraints'

Rails.application.routes.draw do
  root 'pages#home', :as => :home

  #get 'pages/about'

  resources :profiles, :except => :index

  get 'profiles/:user_id/generate_key' => 'profiles#generate_key', :as =>:generate
  post 'profiles/:user_id/delete_key/:key' => 'profiles#delete_key'

  devise_for :users, :controllers => { :registrations => 'registrations' }

  get 'search/' => 'search#search', :as => :search
  get 'search/:query' => 'search#search'
  
  get 'watchlist' => 'lst#show'
  post 'watchlist' => 'lst#addToWatchlist'
  delete 'watchlist' => 'lst#removeFromWatchlist'
  get 'series/:series_id' => 'series#show', :as => :series
  post 'series/:series_id' => 'series#addAllWatched'
  delete 'series/:series_id' => 'series#removeAllWatched'
  get 'series/:series_id/season/all' => 'season#all', :as => :season_all
  get 'series/:series_id/season/:season_id' => 'season#show', :as => :season
  get 'series/:series_id/episode/:ep_id' => 'episode#show', :as => :episode
  post 'series/:series_id/episode/:ep_id' => 'episode#addWatched'
  delete 'series/:series_id/episode/:ep_id' => 'episode#removeWatched'

  namespace :api, defaults: {format: 'json'} do
    scope module: :v1, constraints: ApiConstraints.new(version: 1, default: true) do
      get 'watchlist' => 'lst#show'
      get 'search/:query' => 'search#search'
      get 'searchremote/:query' => 'search#searchRemote'
      get 'user/:id/watchlist' => 'lst#show'
      post 'user/:id/watchlist' => 'lst#addToWatchlist'
      delete 'user/:id/watchlist' => 'lst#removeFromWatchlist'
      get 'series/:series_id' => 'series#show'
      post 'series/:series_id' => 'series#addAllWatched'
      delete 'series/:series_id' => 'series#removeAllWatched'
      get 'series/:series_id/season/all' => 'season#all'
      get 'series/:series_id/season/:season_id' => 'season#show'
      get 'series/:series_id/episode/:ep_id' => 'episode#show'
      post 'series/:series_id/episode/:ep_id' => 'episode#addWatched'
      delete 'series/:series_id/episode/:ep_id' => 'episode#removeWatched'
    end
  end
end<commit_msg>Add season_id and episode_id to route for api removeWatched episode<commit_after>require 'api_constraints'

Rails.application.routes.draw do
  root 'pages#home', :as => :home

  #get 'pages/about'

  resources :profiles, :except => :index

  get 'profiles/:user_id/generate_key' => 'profiles#generate_key', :as =>:generate
  post 'profiles/:user_id/delete_key/:key' => 'profiles#delete_key'

  devise_for :users, :controllers => { :registrations => 'registrations' }

  get 'search/' => 'search#search', :as => :search
  get 'search/:query' => 'search#search'
  
  get 'watchlist' => 'lst#show'
  post 'watchlist' => 'lst#addToWatchlist'
  delete 'watchlist' => 'lst#removeFromWatchlist'
  get 'series/:series_id' => 'series#show', :as => :series
  post 'series/:series_id' => 'series#addAllWatched'
  delete 'series/:series_id' => 'series#removeAllWatched'
  get 'series/:series_id/season/all' => 'season#all', :as => :season_all
  get 'series/:series_id/season/:season_id' => 'season#show', :as => :season
  get 'series/:series_id/episode/:ep_id' => 'episode#show', :as => :episode
  post 'series/:series_id/episode/:ep_id' => 'episode#addWatched'
  delete 'series/:series_id/episode/:ep_id' => 'episode#removeWatched'

  namespace :api, defaults: {format: 'json'} do
    scope module: :v1, constraints: ApiConstraints.new(version: 1, default: true) do
      get 'watchlist' => 'lst#show'
      get 'search/:query' => 'search#search'
      get 'searchremote/:query' => 'search#searchRemote'
      get 'user/:id/watchlist' => 'lst#show'
      post 'user/:id/watchlist' => 'lst#addToWatchlist'
      delete 'user/:id/watchlist/:series_id' => 'lst#removeFromWatchlist'
      get 'series/:series_id' => 'series#show'
      post 'series/:series_id' => 'series#addAllWatched'
      delete 'series/:series_id' => 'series#removeAllWatched'
      get 'series/:series_id/season/all' => 'season#all'
      get 'series/:series_id/season/:season_id' => 'season#show'
      get 'series/:series_id/episode/:ep_id' => 'episode#show'
      post 'series/:series_id/episode/:ep_id' => 'episode#addWatched'
      delete 'series/:series_id/season/:season_id/episode/:ep_id' => 'episode#removeWatched'
    end
  end
end
{'fraction_non_alphanumeric': 0.17404403244495945, 'fraction_numerical': 0.0009269988412514484, 'mean_word_length': 4.656618610747051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 81, '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': '6490712', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1563, 'n_words': 280}