polyglot/config/routes.rb

36 lines
992 B
Ruby
Raw Normal View History

Rails.application.routes.draw do
get 'video_sessions/create'
2018-08-28 13:46:15 +00:00
devise_for :users, path: '', path_names: { sign_out: 'logout'}
devise_scope :user do
get '/logout', to: 'devise/sessions#destroy'
end
authenticated :user do
root to: "pages#index"
end
unauthenticated :user do
root to: "pages#home"
end
2018-08-28 17:26:33 +00:00
get '/call', to: 'pages#call'
get '/establish_call/:contact_id', to: 'pages#establish_call', as: 'establish_call'
post '/accept_call', to: 'pages#accept_call', as: 'accept_call/'
patch '/accept_call/:request_id', to: 'requests#update', as: 'update_request'
2018-08-28 16:18:58 +00:00
get '/contacts', to: 'pages#index'
post '/sessions', to: 'video_sessions#create'
resources :chat_rooms, only: [ :show ] do
# testing action cable
post '/cable_testing', to: 'pages#cable_testing'
end
mount ActionCable.server, at: '/cable'
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
2018-08-28 14:00:54 +00:00
get '/home', to: 'pages#home'
end