From 47ba7619549c3bdbd3e0795d2bfed87248ac0134 Mon Sep 17 00:00:00 2001 From: febbweiss Date: Fri, 25 Sep 2015 08:40:03 +0000 Subject: [PATCH] Bugfix: right way to get login data --- public/js/services/authentication.service.js | 6 +++--- public/login/login.view.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/services/authentication.service.js b/public/js/services/authentication.service.js index 4970ea8..3a4951d 100644 --- a/public/js/services/authentication.service.js +++ b/public/js/services/authentication.service.js @@ -17,11 +17,11 @@ function login(username, password ) { return $http.post( apiRoutes.login, {username: username, password: password}) - .then(function(response, status) { - if( status === 200 ) { + .then(function(response) { + if( response.status === 200 ) { return { success: true, - user: response + user: response.data }; } else { return { diff --git a/public/login/login.view.html b/public/login/login.view.html index 96b7403..ff834c3 100644 --- a/public/login/login.view.html +++ b/public/login/login.view.html @@ -8,7 +8,7 @@ Username is required
- + Password is required