Add auth and ruby update

This commit is contained in:
david 2024-09-22 21:57:05 +02:00
parent 5d50194f39
commit fbf6923835
43 changed files with 614 additions and 64 deletions

View file

@ -1,24 +1,29 @@
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
Rails.application.routes.draw do
resources :links
resources :link_categories
namespace :admin do
get "backup", to: "backups#show", as: :backup
end
constraints Rodauth::Rails.authenticate do
namespace :admin do
get "backup", to: "backups#show", as: :backup
end
resources :checklist_entries
resources :checklists
resources :checks
resources :elements
resources :link_categories
resources :links
resources :reports
resources :success_criteria
resources :reports
resources :checklists
resources :checks
resources :checklist_entries
resources :success_criteria
resources :elements
get "backoffice/show", as: :backoffice
get "profile", to: "rodauth#profile"
end
# 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
if Rails.env.development?
if Rails.env.development? || ENV.fetch("ENABLE_BENCHMARK", false)
namespace :benchmarking do
post "read_heavy"
post "write_heavy"
@ -33,6 +38,5 @@ Rails.application.routes.draw do
end
end
# Defines the root path route ("/")
root 'home#show'
root "home#show"
end