From 4df9544770d48e6598132e96722e9744c54296ab Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 15 Dec 2014 20:17:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 1 - app/api/mobile/apis/watches.rb | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 8cf37e66a..ab74c16e6 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -14,7 +14,6 @@ module Mobile us = UsersService.new user = us.register params.merge(:password_confirmation => params[:password], :should_confirmation_password => true) - binding.pry raise "register failed #{user.errors.full_messages}" if user.new_record? present :data, user, with: Mobile::Entities::User diff --git a/app/api/mobile/apis/watches.rb b/app/api/mobile/apis/watches.rb index 4e8510d89..bbe48cccf 100644 --- a/app/api/mobile/apis/watches.rb +++ b/app/api/mobile/apis/watches.rb @@ -12,7 +12,8 @@ module Mobile authenticate! us = UsersService.new ws = us.user_watcher(id: current_user.id) - {status: 0, data: ws } + present :data, ws, with: Mobile::Entities::User + present :status, 0 end @@ -44,4 +45,4 @@ module Mobile end end end -end \ No newline at end of file +end