summaryrefslogtreecommitdiff
path: root/users/app/controllers/v1
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/controllers/v1')
-rw-r--r--users/app/controllers/v1/sessions_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/users/app/controllers/v1/sessions_controller.rb b/users/app/controllers/v1/sessions_controller.rb
index 27d10fb..0551ca9 100644
--- a/users/app/controllers/v1/sessions_controller.rb
+++ b/users/app/controllers/v1/sessions_controller.rb
@@ -18,12 +18,20 @@ module V1
def update
authenticate!
- render :json => session.delete(:handshake)
+ render :json => login_response
end
def destroy
logout
redirect_to root_path
end
+
+ protected
+
+ def login_response
+ handshake = session.delete(:handshake)
+ handshake.to_hash.merge(:id => current_user.id)
+ end
+
end
end