l4d.tools/config/routes.rb
2026-01-18 18:50:31 +01:00

33 lines
866 B
Ruby

Rails.application.routes.draw do
# Health check
get "up" => "rails/health#show", as: :rails_health_check
# Authentication
root "pages#home"
get "auth/steam", to: "sessions#auth_request"
get "auth/steam/callback", to: "sessions#steam_callback", as: :steam_callback
post "auth/steam/callback", to: "sessions#steam_callback"
get "logout", to: "sessions#logout", as: :logout
get "dashboard", to: "dashboard#index", as: :dashboard
# Server resources
resources :server_templates do
resources :overlays, only: [ :create, :destroy ]
end
resources :overlays, only: [ :index, :new, :create, :destroy ]
resources :job_logs, only: [ :index, :show ]
resources :servers do
member do
post :spawn
post :start
post :stop
post :restart
end
end
# WebSocket for logs
mount ActionCable.server => "/cable"
end