Fixup Routes: properly handle custom domains, add /events/:id alias

This commit is contained in:
Michael Ball 2021-03-02 21:50:59 -08:00
parent b41b77c676
commit 71eb408620

View file

@ -167,6 +167,7 @@ Osem::Application.routes.draw do
end
end
resource :program, only: [] do
get 'event/:id', to: 'proposals#show', as: :conference_program_event
get 'proposal/:id', to: 'proposals#show' # For backward compatibility
resources :proposals, except: :destroy do
get 'commercials/render_commercial' => 'commercials#render_commercial'
@ -222,15 +223,15 @@ Osem::Application.routes.draw do
get '/admin' => redirect('/admin/conferences')
constraints DomainConstraint do
root to: 'conferences#show'
end
unless ENV['OSEM_ROOT_CONFERENCE'].blank?
root to: redirect("/conferences/#{ENV['OSEM_ROOT_CONFERENCE']}")
else
root to: 'conferences#index', via: [:get, :options]
end
constraints DomainConstraint do
root to: 'conferences#show'
end
get '/.well-known/apple-developer-merchantid-domain-association', to: 'application#apple_pay'
end