<commit_before>Pwb::Engine.routes.draw do
  root to: 'welcome#index'
  resources :welcome, only: :index

  get "/admin_panel" => "admin_panel#show"

  # TODO - get locales dynamically
  scope "(:locale)", locale: /en|nl|es|fr|de|pt|it|ca|ar/ do
    resources :welcome, only: :index

    get "/properties/for-rent/:id/:url_friendly_title" => "props#show_for_rent", as: "prop_show_for_rent"
    get "/properties/for-sale/:id/:url_friendly_title" => "props#show_for_sale", as: "prop_show_for_sale"
  end

  namespace :api do
    namespace :v1 do
      get "/client_translations/:locale" => "client_translations#index"


      # below gets FieldConfig values for a batch_key such as "person-titles"
      # and returns all the locale translations so an admin
      # can manage them..
      get "/lang/admin_translations/:batch_key" => "client_translations#get_by_batch"
      # post "/lang/admin_translations" => "client_translations#create_translation_value"

      # post "/lang/admin_translations/add_locale_translation" => "client_translations#add_locale_translation"
      # delete "/lang/admin_translations/:id" => "client_translations#delete_translation_values"


      get "/agency" => "agency#show"
      get "/infos" => "agency#infos"
      # get "/web-contents" => "agency#infos"
      jsonapi_resources :lite_properties
      jsonapi_resources :properties
      jsonapi_resources :web_contents
      get "/select_values" => "select_values#by_field_names"
<commit_msg>expand admin routes<commit_after>Pwb::Engine.routes.draw do
  root to: 'welcome#index'
  resources :welcome, only: :index

  get "/admin" => "admin_panel#show"
  get "/admin/*path" => "admin_panel#show"

  # TODO - get locales dynamically
  scope "(:locale)", locale: /en|nl|es|fr|de|pt|it|ca|ar/ do
    resources :welcome, only: :index

    get "/properties/for-rent/:id/:url_friendly_title" => "props#show_for_rent", as: "prop_show_for_rent"
    get "/properties/for-sale/:id/:url_friendly_title" => "props#show_for_sale", as: "prop_show_for_sale"

    get "/admin" => "admin_panel#show"
    get "/admin/*path" => "admin_panel#show"

  end

  namespace :api do
    namespace :v1 do
      get "/client_translations/:locale" => "client_translations#index"


      # below gets FieldConfig values for a batch_key such as "person-titles"
      # and returns all the locale translations so an admin
      # can manage them..
      get "/lang/admin_translations/:batch_key" => "client_translations#get_by_batch"
      # post "/lang/admin_translations" => "client_translations#create_translation_value"

      # post "/lang/admin_translations/add_locale_translation" => "client_translations#add_locale_translation"
      # delete "/lang/admin_translations/:id" => "client_translations#delete_translation_values"


      get "/agency" => "agency#show"
      get "/infos" => "agency#infos"
      # get "/web-contents" => "agency#infos"
      jsonapi_resources :lite_properties
      jsonapi_resources :properties
      jsonapi_resources :web_contents
      get "/select_values" => "select_values#by_field_names"

{'fraction_non_alphanumeric': 0.1278805582603051, 'fraction_numerical': 0.0006491398896462187, 'mean_word_length': 4.136666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 30, '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': '4577646', 'n_tokens_mistral': 1007, 'n_tokens_neox': 982, 'n_words': 205}