From 24bd133d9d4c9a30c4609cf6d55f02ab6f05c142 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 14 Aug 2014 15:43:16 +0100 Subject: Added extra nesting .data and rename callback to be response not data --- webclient/login/login-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webclient/login') 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) { -- cgit 1.4.1