mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Remove spree.root route and respective controller. Also move
unauthorized route to main app. This route is no longer used in OFN
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
module Spree
|
||||
class HomeController < Spree::StoreController
|
||||
respond_to :html
|
||||
|
||||
def index; end
|
||||
end
|
||||
end
|
||||
@@ -9,6 +9,7 @@ Openfoodnetwork::Application.routes.draw do
|
||||
get "/about_us", to: redirect(ContentConfig.footer_about_url)
|
||||
|
||||
get "/login", to: redirect("/#/login")
|
||||
get '/unauthorized', :to => 'home#unauthorized', :as => :unauthorized
|
||||
|
||||
get "/discourse/login", to: "discourse_sso#login"
|
||||
get "/discourse/sso", to: "discourse_sso#sso"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Overriding Devise routes to use our own controller
|
||||
Spree::Core::Engine.routes.draw do
|
||||
root to: 'home#index'
|
||||
|
||||
devise_for :spree_user,
|
||||
:class_name => 'Spree::User',
|
||||
:controllers => { :sessions => 'spree/user_sessions',
|
||||
@@ -174,8 +172,6 @@ Spree::Core::Engine.routes.draw do
|
||||
|
||||
# Used by spree_paypal_express
|
||||
get '/checkout/:state', :to => 'checkout#edit', :as => :checkout_state
|
||||
|
||||
get '/unauthorized', :to => 'home#unauthorized', :as => :unauthorized
|
||||
get '/content/cvv', :to => 'content#cvv', :as => :cvv
|
||||
get '/content/*path', :to => 'content#show', :as => :content
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ module Spree
|
||||
redirect_to '/unauthorized'
|
||||
else
|
||||
store_location
|
||||
redirect_to respond_to?(:spree_login_path) ? spree_login_path : spree.root_path
|
||||
redirect_to(respond_to?(:spree_login_path) ? spree_login_path : main_app.root_path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user