You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
Rails.application.routes.draw do
|
|
namespace :admin do
|
|
resources :entries
|
|
resources :users
|
|
|
|
|
|
|
|
root to: "entries#index"
|
|
end
|
|
|
|
authenticate :user, ->(u) { u.is_admin? } do
|
|
scope :admin do
|
|
mount PgHero::Engine, at: "pghero", as: :pghero
|
|
end
|
|
end
|
|
|
|
resources :entries do
|
|
post :start_timer, on: :collection
|
|
member do
|
|
post :stop_timer
|
|
end
|
|
collection do
|
|
get :export_csv
|
|
end
|
|
end
|
|
resource :user_goal, only: [:update]
|
|
root 'entries#index'
|
|
devise_for :users, controllers: {
|
|
registrations: 'users/registrations'
|
|
}
|
|
get '/impressum', to: 'static_pages#impressum'
|
|
get "/monthly_report", to: "entries#monthly_report", as: :monthly_report_entries
|
|
post "/db_dump/restore", to: "db_dump#restore"
|
|
get "/db_dump/dump", to: "db_dump#dump"
|
|
|
|
get "/db_dump", to: "db_dump#index"
|
|
get "/rechner", to: "calculations#new", as: :rechner
|
|
# 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"
|
|
end
|