diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 18255fb2b..b999a91b9 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1520,7 +1520,7 @@ class CoursesController < ApplicationController end end - @videos = @videos.select("course_videos.id, videos.user_id, videos.title, IFNULL(hisotries.time,0) AS total_time, IFNULL(hisotries.num,0) AS people_num") + @videos = @videos.select("course_videos.id, videos.user_id, videos.title AS video_title, IFNULL(hisotries.time,0) AS total_time, IFNULL(hisotries.num,0) AS people_num") @videos = paginate @videos end diff --git a/app/views/courses/watch_video_histories.json.jbuilder b/app/views/courses/watch_video_histories.json.jbuilder index 8efab4a20..7ae2c764e 100644 --- a/app/views/courses/watch_video_histories.json.jbuilder +++ b/app/views/courses/watch_video_histories.json.jbuilder @@ -1,7 +1,7 @@ json.videos do json.array! @videos do |v| json.id v.id - json.title v.title + json.title v['video_title'] json.user_name v.user&.real_name json.people_num v['people_num'] json.total_time v['total_time'].round(0)