From a6a0681b78d13b2f55101ca153c6436d05029025 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sat, 2 Apr 2016 08:08:03 +0800 Subject: [PATCH] =?UTF-8?q?openid=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 9d75b8560..c7f8509ae 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -12,7 +12,7 @@ module Mobile requires :openid, type: String end post do - user = UserWechat.find_by_openid(params[:openid]) + user = UserWechat.find_by_openid(params[:openid]).user shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id) page = params[:page] ? params[:page] : 0