2018-08-27 14:37:06 +00:00
|
|
|
Rails.application.routes.draw do
|
2018-08-30 17:42:42 +00:00
|
|
|
|
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
|
2018-08-28 16:41:10 +00:00
|
|
|
|
|
|
|
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'
|
|
|
|
|
2018-08-30 02:00:09 +00:00
|
|
|
get '/establish_call/:contact_id', to: 'pages#establish_call', as: 'establish_call'
|
|
|
|
|
2018-08-30 13:18:26 +00:00
|
|
|
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'
|
2018-08-31 09:17:26 +00:00
|
|
|
get '/setting', to: 'users#setting'
|
2018-08-27 18:05:57 +00:00
|
|
|
post '/sessions', to: 'video_sessions#create'
|
|
|
|
|
2018-08-30 17:42:42 +00:00
|
|
|
post '/chat_rooms/chat_room_sessions', to: 'chat_rooms#create'
|
|
|
|
|
2018-08-30 02:00:09 +00:00
|
|
|
resources :chat_rooms, only: [ :show ] do
|
|
|
|
# testing action cable
|
|
|
|
post '/cable_testing', to: 'pages#cable_testing'
|
|
|
|
end
|
|
|
|
|
2018-08-27 18:05:57 +00:00
|
|
|
mount ActionCable.server, at: '/cable'
|
2018-08-27 14:37:06 +00:00
|
|
|
# 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'
|
2018-08-29 13:53:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
get '/users/:id', to: 'users#show', as: :user
|
|
|
|
get '/users/:id/edit', to: 'users#edit', as: :user_edit
|
|
|
|
patch '/users/:id', to: 'users#update'
|
|
|
|
delete '/users/:id', to: 'users#destroy'
|
2018-08-27 14:37:06 +00:00
|
|
|
end
|