summary refs log tree commit diff
path: root/webclient/login/login-controller.js
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-14 15:43:16 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-14 15:43:16 +0100
commit24bd133d9d4c9a30c4609cf6d55f02ab6f05c142 (patch)
tree7effd5812d53c0d72ba3cdeefa08b2552ed81565 /webclient/login/login-controller.js
parentMove the unknown token broadcast to the interceptor. Return the $http promise... (diff)
downloadsynapse-24bd133d9d4c9a30c4609cf6d55f02ab6f05c142.tar.xz
Added extra nesting .data and rename callback to be response not data
Diffstat (limited to 'webclient/login/login-controller.js')
-rw-r--r--webclient/login/login-controller.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/login/login-controller.js b/webclient/login/login-controller.js
index c519f7698c..015868b0b9 100644
--- a/webclient/login/login-controller.js
+++ b/webclient/login/login-controller.js
@@ -68,7 +68,7 @@ angular.module('LoginController', ['matrixService'])
         // try to login
         matrixService.login($scope.account.user_id, $scope.account.password).then(
             function(response) {
-                if ("access_token" in response) {
+                if ("access_token" in response.data) {
                     $scope.feedback = "Login successful.";
                     matrixService.setConfig({
                         homeserver: $scope.account.homeserver,
@@ -79,7 +79,7 @@ angular.module('LoginController', ['matrixService'])
                     $location.path("rooms");
                 }
                 else {
-                    $scope.feedback = "Failed to login: " + JSON.stringify(response);
+                    $scope.feedback = "Failed to login: " + JSON.stringify(response.data);
                 }
             },
             function(error) {