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.
39 lines
1.5 KiB
39 lines
1.5 KiB
Rails.application.routes.draw do
|
|
namespace :api do
|
|
namespace :v1 do
|
|
post "auth/login", to: "auth#login"
|
|
post "auth/register", to: "auth#register"
|
|
post "auth/confirm", to: "auth#confirm"
|
|
post "auth/confirmation/resend", to: "auth#resend_confirmation"
|
|
post "auth/password/forgot", to: "auth#forgot_password"
|
|
patch "auth/password/reset", to: "auth#reset_password"
|
|
patch "auth/password/change", to: "auth#change_password"
|
|
delete "auth/logout", to: "auth#logout"
|
|
get "auth/me", to: "auth#me"
|
|
|
|
resources :entries do
|
|
post :start_timer, on: :collection
|
|
post :stop_timer, on: :member
|
|
get :export_csv, on: :collection
|
|
end
|
|
get "dashboard", to: "dashboard#show"
|
|
get "calendar", to: "calendar#index"
|
|
get "monthly_report", to: "reports#monthly"
|
|
resources :mileage_rates, except: %i[new edit destroy]
|
|
resource :settings, only: %i[show update]
|
|
namespace :admin do
|
|
get "backup", to: "database#backup"
|
|
post "restore", to: "database#restore"
|
|
resources :users, only: %i[index show create update destroy]
|
|
resources :entries, only: %i[index show update destroy]
|
|
resources :training_watch_sources
|
|
resources :training_watch_hits, only: %i[index show destroy]
|
|
post "training_watch/run", to: "training_watch#run"
|
|
end
|
|
end
|
|
end
|
|
|
|
mount AuthenticatedPgHero.new(PgHero::Engine), at: "/admin/pghero"
|
|
|
|
get "up" => "rails/health#show", as: :rails_health_check
|
|
end
|