allow selecting conference option
This commit is contained in:
@@ -18,25 +18,6 @@ class BroadcastsController < ApplicationController
|
||||
def create
|
||||
@broadcast.attributes = broadcast_params
|
||||
|
||||
begin
|
||||
graph_api = MicrosoftGraph.new(
|
||||
current_user,
|
||||
ENV['AZURE_CLIENT_ID'],
|
||||
ENV['AZURE_CLIENT_SECRET'],
|
||||
ENV['AZURE_TENANT_ID'],
|
||||
ENV['AZURE_SCOPES']
|
||||
)
|
||||
|
||||
subject = "#{@broadcast.name} Online Meeting"
|
||||
teams_meeting = graph_api.create_teams_meeting(subject)
|
||||
join_url = teams_meeting['joinUrl']
|
||||
@broadcast.microsoft_teams_meeting_url = join_url if join_url.present?
|
||||
rescue StandardError => e
|
||||
@broadcast.errors[:base] << e.message
|
||||
render :new
|
||||
return
|
||||
end
|
||||
|
||||
if @broadcast.save
|
||||
log_create_analytics
|
||||
redirect_to [@project, :broadcasts], notice: t(".notice")
|
||||
@@ -46,8 +27,7 @@ class BroadcastsController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
# @conference_url = url_for [@broadcast.project, @broadcast, :zoom_meeting]
|
||||
@conference_url = @broadcast.microsoft_teams_meeting_url
|
||||
@conference_url = url_for [@broadcast.project, @broadcast, :conference_meeting]
|
||||
@recordings = @broadcast.broadcast_recordings.order_by_recent.paginate(page: params[:page])
|
||||
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
||||
render layout: 'application'
|
||||
@@ -93,7 +73,7 @@ class BroadcastsController < ApplicationController
|
||||
end
|
||||
|
||||
def broadcast_params
|
||||
params.require(:broadcast).permit(:name, :shoot_location_time_zone, files: [])
|
||||
params.require(:broadcast).permit(:name, :shoot_location_time_zone, :conference_option, files: [])
|
||||
end
|
||||
|
||||
def set_project
|
||||
|
||||
Reference in New Issue
Block a user