<commit_before>Rails.application.routes.draw do

  devise_for :users, controllers: { confirmations: 'confirmations' }
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html

  ### JSON API ###
  namespace :api do

    get 'test' => 'api#test' # Dummy action for testing generic ApiController

    ### API V1 (LEGACY) ###
    namespace :v1 do

      # Places
      resources :places do
        collection do
          get 'search'
          get 'recent'
          get 'search'
          post 'within_area'
        end
      end #places

      # Translations
      resources :translations do
        collection do
          post 'find'
          get  'all'
        end
      end

      # Trips & Itineraries/Planning
      resources :trips, only: [:create] do
        collection do
          post 'email'
        end
      end
      get 'trips/past_trips' => 'trips#past_trips'
      get 'trips/future_trips' => 'trips#future_trips'
      # post 'trips/past_trips' => 'trips#index'
      post 'itineraries/plan' => 'trips#create'
      post 'itineraries/select' => 'trips#select'
      post 'itineraries/cancel' => 'trips#cancel'
      post 'itineraries/book' => 'trips#book'
      post 'trip_purposes/list' => 'users#trip_purposes'

      # Users
      resources :users do
        collection do
          get 'profile'
          get 'get_guest_token'
          post 'update'
          post 'password'
          post 'request_reset'
          post 'reset'
          get  'lookup'
        end
      end

      devise_scope :user do
        post 'sign_up' => 'registrations#create'
        post 'sign_in' => 'sessions#create'
        post 'sign_out' => 'sessions#destroy'
        delete 'sign_out' => 'sessions#destroy'
      end #users

      resources :services do
        collection do
          get 'ids_humanized'
          get 'hours'
        end
      end

    end #v1<commit_msg>API for getting user's current balance<commit_after>Rails.application.routes.draw do

  devise_for :users, controllers: { confirmations: 'confirmations' }
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html

  ### JSON API ###
  namespace :api do

    get 'test' => 'api#test' # Dummy action for testing generic ApiController

    ### API V1 (LEGACY) ###
    namespace :v1 do

      # Places
      resources :places do
        collection do
          get 'search'
          get 'recent'
          get 'search'
          post 'within_area'
        end
      end #places

      # Translations
      resources :translations do
        collection do
          post 'find'
          get  'all'
        end
      end

      # Trips & Itineraries/Planning
      resources :trips, only: [:create] do
        collection do
          post 'email'
        end
      end
      get 'trips/past_trips' => 'trips#past_trips'
      get 'trips/future_trips' => 'trips#future_trips'
      # post 'trips/past_trips' => 'trips#index'
      post 'itineraries/plan' => 'trips#create'
      post 'itineraries/select' => 'trips#select'
      post 'itineraries/cancel' => 'trips#cancel'
      post 'itineraries/book' => 'trips#book'
      post 'trip_purposes/list' => 'users#trip_purposes'

      # Users
      resources :users do
        collection do
          get 'profile'
          get 'get_guest_token'
          post 'update'
          post 'password'
          post 'request_reset'
          post 'reset'
          get  'lookup'
          get  'current_balance'
        end
      end

      devise_scope :user do
        post 'sign_up' => 'registrations#create'
        post 'sign_in' => 'sessions#create'
        post 'sign_out' => 'sessions#destroy'
        delete 'sign_out' => 'sessions#destroy'
      end #users

      resources :services do
        collection do
          get 'ids_humanized'
          get 'hours'
        end
      end

    end #v1
{'fraction_non_alphanumeric': 0.09877488514548238, 'fraction_numerical': 0.0015313935681470138, 'mean_word_length': 1.9577358490566037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, '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': '3048915', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1177, 'n_words': 318}