From ff66e33865b13aba76f8f026c9db819d2af0f15b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 18 Feb 2020 23:31:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- app/views/weapps/homes/show.json.jbuilder | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 411481f0e..d81b3abb3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -308,7 +308,7 @@ class ApplicationController < ActionController::Base end if !User.current.logged? && Rails.env.development? - User.current = User.find 1 + User.current = User.find 8686 end diff --git a/app/views/weapps/homes/show.json.jbuilder b/app/views/weapps/homes/show.json.jbuilder index bbb5e2fc8..f307d64fe 100644 --- a/app/views/weapps/homes/show.json.jbuilder +++ b/app/views/weapps/homes/show.json.jbuilder @@ -25,5 +25,6 @@ json.courses @courses.each do |course| json.school course.school&.name course_member = @category == "study" ? course.students.where(user_id: @user.id).first : course.teachers.where(user_id: @user.id).first json.sticky course_member.sticky + json.course_identity current_user.course_identity(course) end