dev_video
daiao 5 years ago
parent a28330c182
commit 847f422ce5

@ -11,6 +11,7 @@ class Videos::BatchPublishService < ApplicationService
def call
video_params = Array.wrap(params[:videos]).compact
return if video_params.blank?
Rails.logger.info("#####video_course: #{video_params}")
video_ids = []
ActiveRecord::Base.transaction do
@ -28,7 +29,6 @@ class Videos::BatchPublishService < ApplicationService
video_ids << video.id
Rails.logger.info("#####video_course: #{params[:course_id]}")
# 如果是课堂上传则创建课堂记录
if params[:course_id].present?
video.course_videos.create!(course_id: params[:course_id])

Loading…
Cancel
Save