Commit ba284fcd8361ddd9934acd87b81c107e0e6e5b8e

Authored by Caio Almeida
1 parent bcb38be4

Fixing login

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
www/js/controllers.js
@@ -121,10 +121,10 @@ angular.module('confjuvapp.controllers', []) @@ -121,10 +121,10 @@ angular.module('confjuvapp.controllers', [])
121 .then(function(resp) { 121 .then(function(resp) {
122 $scope.closeModal(); 122 $scope.closeModal();
123 var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); 123 var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' });
124 - $scope.profile = resp.data.person; 124 + $scope.profile = resp.data.user.person;
125 $scope.setStateAndCityOfProfile(); 125 $scope.setStateAndCityOfProfile();
126 popup.then(function() { 126 popup.then(function() {
127 - $scope.loginCallback(resp.data.private_token); 127 + $scope.loginCallback(resp.data.user.private_token);
128 }); 128 });
129 }, function(err) { 129 }, function(err) {
130 $scope.closeModal(); 130 $scope.closeModal();