2018-06-26 10:29:46 -04:00
|
|
|
# frozen_string_literal: true
|
2018-05-07 16:06:01 -04:00
|
|
|
|
2018-08-01 09:45:12 -04:00
|
|
|
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
|
|
|
#
|
|
|
|
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify it under the
|
|
|
|
# terms of the GNU Lesser General Public License as published by the Free Software
|
|
|
|
# Foundation; either version 3.0 of the License, or (at your option) any later
|
|
|
|
# version.
|
|
|
|
#
|
|
|
|
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License along
|
|
|
|
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2018-06-26 10:29:46 -04:00
|
|
|
Rails.application.routes.draw do
|
2018-10-12 15:57:53 -04:00
|
|
|
get 'health_check', to: 'health_check/health_check#index'
|
|
|
|
|
2018-06-11 13:05:54 -04:00
|
|
|
# Error routes.
|
|
|
|
match '/404', to: 'errors#not_found', via: :all
|
|
|
|
match '/422', to: 'errors#unprocessable', via: :all
|
|
|
|
match '/500', to: 'errors#internal_error', via: :all
|
|
|
|
|
2018-06-15 16:21:00 -04:00
|
|
|
# Signup routes.
|
2018-06-07 15:52:42 -04:00
|
|
|
get '/signup', to: 'users#new', as: :signup
|
2018-06-08 14:44:08 -04:00
|
|
|
post '/signup', to: 'users#create', as: :create_user
|
2018-05-09 16:31:52 -04:00
|
|
|
|
2018-09-14 14:33:58 -04:00
|
|
|
# Redirect to terms page
|
|
|
|
match '/terms', to: 'users#terms', via: [:get, :post]
|
|
|
|
|
2018-12-21 11:56:52 -05:00
|
|
|
# Password reset resources.
|
|
|
|
resources :password_resets, only: [:new, :create, :edit, :update]
|
|
|
|
|
2018-06-15 16:21:00 -04:00
|
|
|
# User resources.
|
2018-06-18 10:28:47 -04:00
|
|
|
scope '/u' do
|
2018-10-09 14:22:02 -04:00
|
|
|
# Verification Routes
|
|
|
|
scope '/verify' do
|
|
|
|
match '/resend', to: 'users#resend', via: [:get, :post], as: :resend
|
|
|
|
match '/confirm/:user_uid', to: 'users#confirm', via: [:get, :post], as: :confirm
|
|
|
|
end
|
|
|
|
|
2018-06-15 16:21:00 -04:00
|
|
|
# Handles login of greenlight provider accounts.
|
2018-09-14 14:33:58 -04:00
|
|
|
post '/login', to: 'sessions#create', as: :create_session
|
2018-06-26 10:29:46 -04:00
|
|
|
|
2018-06-15 16:21:00 -04:00
|
|
|
# Log the user out of the session.
|
|
|
|
get '/logout', to: 'sessions#destroy'
|
2018-06-21 16:17:18 -04:00
|
|
|
|
2018-07-27 11:36:28 -04:00
|
|
|
# Account management.
|
2018-06-21 16:17:18 -04:00
|
|
|
get '/:user_uid/edit', to: 'users#edit', as: :edit_user
|
|
|
|
patch '/:user_uid/edit', to: 'users#update', as: :update_user
|
2018-07-27 11:36:28 -04:00
|
|
|
delete '/:user_uid', to: 'users#destroy', as: :delete_user
|
2019-02-04 11:21:42 -05:00
|
|
|
|
|
|
|
# All user recordings
|
|
|
|
get '/:user_uid/recordings', to: 'users#recordings', as: :get_user_recordings
|
2018-06-15 16:21:00 -04:00
|
|
|
end
|
2018-05-09 16:31:52 -04:00
|
|
|
|
|
|
|
# Handles Omniauth authentication.
|
2018-05-10 15:03:59 -04:00
|
|
|
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
|
2018-07-23 12:07:26 -04:00
|
|
|
get '/auth/failure', to: 'sessions#omniauth_fail'
|
2018-05-07 16:06:01 -04:00
|
|
|
|
2018-06-18 10:28:47 -04:00
|
|
|
# Room resources.
|
|
|
|
resources :rooms, only: [:create, :show, :destroy], param: :room_uid, path: '/'
|
|
|
|
|
|
|
|
# Extended room routes.
|
|
|
|
scope '/:room_uid' do
|
|
|
|
post '/', to: 'rooms#join'
|
2018-12-04 10:48:51 -05:00
|
|
|
patch '/', to: 'rooms#update', as: :update_room
|
2019-02-06 11:08:19 -05:00
|
|
|
post '/update_settings', to: 'rooms#update_settings'
|
2018-06-18 10:28:47 -04:00
|
|
|
post '/start', to: 'rooms#start', as: :start_room
|
|
|
|
get '/logout', to: 'rooms#logout', as: :logout_room
|
2018-06-26 10:29:46 -04:00
|
|
|
|
2018-12-13 11:58:33 -05:00
|
|
|
# Manage recordings
|
2018-06-18 10:28:47 -04:00
|
|
|
scope '/:record_id' do
|
|
|
|
post '/', to: 'rooms#update_recording', as: :update_recording
|
|
|
|
delete '/', to: 'rooms#delete_recording', as: :delete_recording
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-05-07 16:06:01 -04:00
|
|
|
root to: 'main#index'
|
2018-05-22 16:58:11 -04:00
|
|
|
end
|