about summary refs log tree commit diff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-08-31 19:44:47 +0200
committerGitHub <noreply@github.com>2019-08-31 19:44:47 +0200
commit147e90f35d9aadfbe15d044f3ce48be77e26968a (patch)
treeb8aad6a1a34cd897bdb187cdf1fb1cacf7ac721c /config/routes.rb
parent2848c08953a8555e06791170dbf1090575e05d8a (diff)
parentef270ed0df5a247b77853610f2f108206828a67a (diff)
Merge pull request #1209 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 789b5f502..a7e65b034 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -6,6 +6,8 @@ require 'sidekiq-scheduler/web'
 Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
 
 Rails.application.routes.draw do
+  root 'home#index'
+
   mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
 
   authenticate :user, lambda { |u| u.admin? } do
@@ -336,6 +338,7 @@ Rails.application.routes.draw do
       end
 
       resource :domain_blocks, only: [:show, :create, :destroy]
+      resource :directory, only: [:show]
 
       resources :follow_requests, only: [:index] do
         member do
@@ -440,10 +443,6 @@ Rails.application.routes.draw do
   get '/about/blocks', to: 'about#blocks'
   get '/terms',        to: 'about#terms'
 
-  root 'home#index'
-
-  match '*unmatched_route',
-        via: :all,
-        to: 'application#raise_not_found',
-        format: false
+  match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false
+  match '*unmatched_route', via: :all, to: 'application#raise_not_found', format: false
 end