forked from External/greenlight
Fixes required for making the logouturl work
This commit is contained in:
parent
061f9c794a
commit
bd3cbee2b4
|
@ -8,7 +8,7 @@ class BbbController < ApplicationController
|
||||||
elsif ( !params.has_key?(:name) )
|
elsif ( !params.has_key?(:name) )
|
||||||
render_response("missing_parameter", "user name was not included", :bad_request)
|
render_response("missing_parameter", "user name was not included", :bad_request)
|
||||||
else
|
else
|
||||||
bbb_join_url = helpers.bbb_join_url(params[:id], false, params[:name], false, )
|
bbb_join_url = helpers.bbb_join_url(params[:id], false, params[:name], false, "#{request.base_url}/#{params[:resource]}/#{params[:id]}")
|
||||||
if bbb_join_url[:returncode]
|
if bbb_join_url[:returncode]
|
||||||
logger.info "#Execute the redirect"
|
logger.info "#Execute the redirect"
|
||||||
render_response("ok", "execute the redirect", :ok, {:join_url => bbb_join_url[:join_url]})
|
render_response("ok", "execute the redirect", :ok, {:join_url => bbb_join_url[:join_url]})
|
||||||
|
|
|
@ -3,6 +3,7 @@ class LandingController < ApplicationController
|
||||||
def meeting
|
def meeting
|
||||||
@refreshable = (params[:resource] == 'meetings' && !params.has_key?(:id))
|
@refreshable = (params[:resource] == 'meetings' && !params.has_key?(:id))
|
||||||
@meeting_token = params[:id] || @meeting_token = helpers.new_meeting_token
|
@meeting_token = params[:id] || @meeting_token = helpers.new_meeting_token
|
||||||
|
@resource = params[:resource]
|
||||||
@resource_url = meeting_url(@meeting_token)
|
@resource_url = meeting_url(@meeting_token)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -16,9 +17,10 @@ class LandingController < ApplicationController
|
||||||
|
|
||||||
def room
|
def room
|
||||||
@room_name = params[:name]
|
@room_name = params[:name]
|
||||||
@meeting_token = @room_name
|
|
||||||
@resource_url = room_url(@meeting_token)
|
|
||||||
@user = User.find_by(username: @room_name)
|
@user = User.find_by(username: @room_name)
|
||||||
|
@meeting_token = @room_name
|
||||||
|
@resource = params[:resource]
|
||||||
|
@resource_url = room_url(@meeting_token)
|
||||||
if @user.nil?
|
if @user.nil?
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<label for="join_form_name" class="sr-only">Name</label>
|
<label for="join_form_name" class="sr-only">Name</label>
|
||||||
<input id="join_form_name" type="text" class="form-control input" id="name" placeholder="Your name" required>
|
<input id="join_form_name" type="text" class="form-control input" id="name" placeholder="Your name" required>
|
||||||
</div>
|
</div>
|
||||||
<button id="join_form_button" type="button" class="btn btn-success" data-url="<%= bbb_join_path(@meeting_token) %>">Join</button>
|
<button id="join_form_button" type="button" class="btn btn-success" data-url="<%= bbb_join_path(@resource, @meeting_token) %>">Join</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
get 'bbb/join/:id', to: 'bbb#join', as: :bbb_join
|
get 'bbb/join/:resource/:id', to: 'bbb#join', as: :bbb_join
|
||||||
|
|
||||||
get '/meetings/new', to: 'landing#new_meeting', as: :new_meeting
|
get '/meetings/new', to: 'landing#new_meeting', as: :new_meeting
|
||||||
get '/meetings(/:id)', to: 'landing#meeting', as: :meeting, :resource => "meetings"
|
get '/meetings(/:id)', to: 'landing#meeting', as: :meeting, :resource => "meetings"
|
||||||
|
|
Loading…
Reference in New Issue