properly generate some urls

This commit is contained in:
Zachary Chai
2017-02-07 14:14:39 -05:00
parent bfbdfc645e
commit b09ec1fc69
9 changed files with 20 additions and 15 deletions

View File

@ -19,7 +19,7 @@ Rails.application.routes.draw do
mount ActionCable.server => '/cable'
resources :users, only: [:edit, :update]
get '/users/login', to: 'sessions#new'
get '/users/login', to: 'sessions#new', as: :user_login
get '/users/logout', to: 'sessions#destroy', as: :user_logout
match '/auth/:provider/callback', to: 'sessions#create', via: [:get, :post]
@ -28,24 +28,24 @@ Rails.application.routes.draw do
# There are two resources [meetings|rooms]
# meetings offer a landing page for NON authenticated users to create and join session in BigBlueButton
# rooms offer a customized landing page for authenticated users to create and join session in BigBlueButton
scope '/:resource' do
scope '/:resource', constraints: {resource: /meetings|rooms/} do
# room specific routes
scope '/:room_id' do
# recording routes for updating, deleting and viewing recordings
get '/(:id)/recordings', to: 'bbb#recordings', defaults: {id: nil, format: 'json'}
patch '/(:id)/recordings/:record_id', to: 'bbb#update_recordings', defaults: {id: nil, format: 'json'}
delete '/(:id)/recordings/:record_id', to: 'bbb#delete_recordings', defaults: {id: nil, format: 'json'}
# room specific routes
delete '/:id/end', to: 'bbb#end', defaults: {format: 'json'}
get '/:id/wait', to: 'landing#wait_for_moderator'
get '/:id/session_status_refresh', to: 'landing#session_status_refresh'
end
# routes shared between meetings and rooms
get '/(:room_id)/:id', to: 'landing#resource', defaults: {room_id: nil}
get '/(:room_id)/:id/join', to: 'bbb#join', defaults: {room_id: nil, format: 'json'}
get '/(:room_id)/:id', to: 'landing#resource', as: :meeting_room, defaults: {room_id: nil}
post '/:id/callback', to: 'bbb#callback' #, defaults: {format: 'json'}
end
root to: 'landing#index', :resource => 'meetings'