课程视频时长id

PCqiandao
anke1460 5 years ago
parent 450ba26dc7
commit eddb444072

@ -40,7 +40,7 @@ class CreateWatchVideoService < ApplicationService
# 开始播放时记录一次
if params[:course_id].present?
# 课堂视频
course_video = CourseVideo.find_by(course_id: params[:course_id], video_id: params[:video_id])
course_video = CourseVideo.find_by(params[:course_video_id])
watch_course_video = WatchCourseVideo.find_or_initialize_by(course_video_id: course_video.id, user_id: user.id) do |d|
d.start_at = current_time
d.duration = params[:duration]

Loading…
Cancel
Save