Merge branch 'dev_video' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_video
commit
9a92e57ee1
@ -0,0 +1 @@
|
||||
json.(@live, :id, :description, :url)
|
@ -1,8 +1,11 @@
|
||||
json.lives @lives do |live|
|
||||
json.(live, :id, :url, :description, :on_status)
|
||||
json.(live, :id, :description, :on_status)
|
||||
json.url live.on_status ? live.url : ""
|
||||
json.author_name live.user.show_real_name
|
||||
json.author_login live.user.login
|
||||
json.author_img url_to_avatar(live.user)
|
||||
json.op_auth live.op_auth?
|
||||
json.created_at live.created_at.strftime('%Y-%m-%d')
|
||||
end
|
||||
json.my_live_id @my_live_id
|
||||
json.total_count @total_count
|
@ -0,0 +1,7 @@
|
||||
class MigrateDefalutToTiding < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_default :tidings, :status, from: nil, to: 0
|
||||
|
||||
Tiding.where(status: nil).update_all(status: 0)
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class MigrateTidingStatus < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
Tiding.where(container_type: "JoinCourse", status: 0).each do |tiding|
|
||||
unless CourseMessage.where(course_message_id: tiding.trigger_user_id, course_id: tiding.container_id, course_message_type: "JoinCourseRequest", status: 0).exists?
|
||||
tiding.update!(status: 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 30 KiB |
Loading…
Reference in new issue