From 116b0849a7448a5d237293d7c097a9f1d5aaa5eb Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 6 Oct 2015 17:42:17 -0400 Subject: [PATCH] updated $http call to angular 1.4 implementation --- .../client/src/login/loginModal/loginModal.controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/login/loginModal/loginModal.controller.js b/awx/ui/client/src/login/loginModal/loginModal.controller.js index 52296a4c62..a3386ee3ad 100644 --- a/awx/ui/client/src/login/loginModal/loginModal.controller.js +++ b/awx/ui/client/src/login/loginModal/loginModal.controller.js @@ -186,17 +186,17 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope', '$l Authorization.retrieveToken(username, password) .then(function (data) { $('#login-modal').modal('hide'); - Authorization.setToken(data.token, data.expires); + Authorization.setToken(data.data.token, data.data.expires); $rootScope.sessionTimer = Timer.init(); scope.$emit('AuthorizationGetUser'); }, function (data) { var key; Wait('stop'); - if (data.non_field_errors && data.non_field_errors.length === 0) { + if (data.data.non_field_errors && data.data.non_field_errors.length === 0) { // show field specific errors returned by the API - for (key in data) { - scope[key + 'Error'] = data[key][0]; + for (key in data.data) { + scope[key + 'Error'] = data.data[key][0]; } } else { scope.reset();