课程这边上传的视频直接发布

dev_video
daiao 5 years ago
parent c15b85e368
commit ea08221c2e

@ -22,7 +22,12 @@ class Videos::BatchPublishService < ApplicationService
raise Error, '视频还未上传完成' if video.vod_uploading? raise Error, '视频还未上传完成' if video.vod_uploading?
video.title = param[:title].to_s.strip.presence || video.title video.title = param[:title].to_s.strip.presence || video.title
if param[:course_id].present?
video.publish
else
video.apply_publish video.apply_publish
end
video.save! video.save!
video.video_applies.create! video.video_applies.create!

Loading…
Cancel
Save