diff --git a/app/api/mobile/apis/new_comment.rb b/app/api/mobile/apis/new_comment.rb index d98977661..e72daae6d 100644 --- a/app/api/mobile/apis/new_comment.rb +++ b/app/api/mobile/apis/new_comment.rb @@ -189,7 +189,7 @@ module Mobile reply.content = params[:content] reply.parent_id = params[:id] reply.subject = "RE: #{topic.subject}" - if topic.children << reply + if message.children << reply result = 2 update_id = topic.id end diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 657b1cb7b..30a2a7edd 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -30,19 +30,24 @@ module Mobile u.nil? ? "" : u.show_name when :roles_id u[:roles_id].nil? ? nil : u.roles_id + when :login + u.login + when :lastname + u.lastname + when :mail + u.mail end end end - end end expose :id #头像 - expose :login - expose :lastname + user_expose :login + user_expose :lastname #邮箱地址 - expose :mail + user_expose :mail expose :nickname #真名 user_expose :img_url