forked from External/greenlight
Cleaned up code
This commit is contained in:
@ -1,15 +1,2 @@
|
||||
module ApplicationHelper
|
||||
def bbb_endpoint
|
||||
Rails.application.secrets[:bbb_endpoint]
|
||||
end
|
||||
|
||||
def bbb_secret
|
||||
Rails.application.secrets[:bbb_secret]
|
||||
end
|
||||
|
||||
def random_password(length)
|
||||
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
|
||||
password = (0...length).map { o[rand(o.length)] }.join
|
||||
return password
|
||||
end
|
||||
end
|
||||
|
@ -1,6 +1,20 @@
|
||||
module BbbHelper
|
||||
def bbb_endpoint
|
||||
Rails.application.secrets[:bbb_endpoint]
|
||||
end
|
||||
|
||||
def bbb_secret
|
||||
Rails.application.secrets[:bbb_secret]
|
||||
end
|
||||
|
||||
def random_password(length)
|
||||
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
|
||||
password = (0...length).map { o[rand(o.length)] }.join
|
||||
return password
|
||||
end
|
||||
|
||||
def bbb_join_url(meeting_token, meeting_recorded=false, user_fullname='User', user_is_moderator=false)
|
||||
bbb ||= BigBlueButton::BigBlueButtonApi.new(helpers.bbb_endpoint + "api", bbb_secret, "0.8", true)
|
||||
bbb ||= BigBlueButton::BigBlueButtonApi.new(bbb_endpoint + "api", bbb_secret, "0.8", true)
|
||||
if !bbb
|
||||
return { :returncode => false, :messageKey => "BBBAPICallInvalid", :message => "BBB API call invalid." }
|
||||
else
|
||||
|
Reference in New Issue
Block a user