Rails.application.routes.draw do mount ActionCable.server => "/cable" namespace :api do post "register", to: "registrations#create" post "login", to: "sessions#create" delete "logout", to: "sessions#destroy" get "me", to: "sessions#me" # Matchmaking starts and stops over the MatchmakingChannel WebSocket # (see app/channels/matchmaking_channel.rb). # Match details for the participants of the match. get "matches", to: "matches#index" get "matches/:uuid", to: "matches#show" # Intended for the game-server only; authenticated via HMAC (see # InternalSignatureService), not via a user JWT. namespace :internal do post "matches/:uuid/result", to: "match_results#create" end end # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. get "up" => "rails/health#show", as: :rails_health_check end