polyglot/config/routes.rb

50 lines
1.5 KiB
Ruby
Raw Normal View History

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
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'
2018-08-31 09:17:26 +00:00
get '/setting', to: 'users#setting'
2018-09-05 12:07:43 +00:00
patch '/setting', to: 'users#update_setting', as: 'update_setting'
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-09-04 12:50:44 +00:00
resources :chat_rooms, only: [ :show, :destroy ] do
# testing action cable
post '/cable_testing', to: 'pages#cable_testing'
post '/send_message', to: 'pages#send_message'
post '/translate', to: 'pages#translate'
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'
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-31 14:06:42 +00:00
2018-09-03 14:19:04 +00:00
resources :connections, only: [:create, :destroy]
get '/add_contact', to: 'connections#new', as: :add_contact
end