Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align routes.rb with default GBL routes setup #361

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 40 additions & 34 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
Rails.application.routes.draw do
devise_for :users, path: '', controllers: {omniauth_callbacks: 'omniauth_callbacks'}
devise_scope :user do
mount Blacklight::Engine => '/'
mount Geoblacklight::Engine => 'geoblacklight'

root to: "catalog#index"
concern :searchable, Blacklight::Routes::Searchable.new
mount Blacklight::Engine => '/'
root to: "catalog#index"
concern :searchable, Blacklight::Routes::Searchable.new

resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
concerns :searchable
end
resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
concerns :searchable
end
devise_for :users, path: '', controllers: { omniauth_callbacks: 'omniauth_callbacks' }

concern :exportable, Blacklight::Routes::Exportable.new
concern :exportable, Blacklight::Routes::Exportable.new

resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
concerns :exportable
end
resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
concerns :exportable
end

resources :bookmarks do
concerns :exportable
resources :bookmarks do
concerns :exportable

collection do
delete 'clear'
end
collection do
delete 'clear'
end
end
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
# Can be used by load balancers and uptime monitors to verify that the app is live.
get "up" => "rails/health#show", as: :rails_health_check

# Defines the root path route ("/")
# root "posts#index"
mount Geoblacklight::Engine => 'geoblacklight'
concern :gbl_exportable, Geoblacklight::Routes::Exportable.new
resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
concerns :gbl_exportable
end
concern :gbl_wms, Geoblacklight::Routes::Wms.new
namespace :wms do
concerns :gbl_wms
end
concern :gbl_downloadable, Geoblacklight::Routes::Downloadable.new
namespace :download do
concerns :gbl_downloadable
end
resources :download, only: [:show]

concern :gbl_exportable, Geoblacklight::Routes::Exportable.new
resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
concerns :gbl_exportable
end
concern :gbl_wms, Geoblacklight::Routes::Wms.new
namespace :wms do
concerns :gbl_wms
end
concern :gbl_downloadable, Geoblacklight::Routes::Downloadable.new
namespace :download do
concerns :gbl_downloadable
end
resources :download, only: [:show]

# NYU Routes
# NYU Routes
devise_scope :user do
get 'logout', to: 'devise/sessions#destroy', as: :logout
end
end
Expand Down