Commit 7562257e843b14dc0fc13ea524f44c7bb3904d80
1 parent
03e59a11
Exists in
master
and in
2 other branches
Reverting new login and adding patch to be applied when server is updated
Showing
2 changed files
with
25 additions
and
2 deletions
Show diff stats
| @@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
| 1 | +commit ba284fcd8361ddd9934acd87b81c107e0e6e5b8e | ||
| 2 | +Author: Caio SBA <caiosba@gmail.com> | ||
| 3 | +Date: Mon Sep 28 11:27:49 2015 -0300 | ||
| 4 | + | ||
| 5 | + Fixing login | ||
| 6 | + | ||
| 7 | +diff --git a/www/js/controllers.js b/www/js/controllers.js | ||
| 8 | +index ff5fd08..d17a203 100644 | ||
| 9 | +--- a/www/js/controllers.js | ||
| 10 | ++++ b/www/js/controllers.js | ||
| 11 | +@@ -121,10 +121,10 @@ angular.module('confjuvapp.controllers', []) | ||
| 12 | + .then(function(resp) { | ||
| 13 | + $scope.closeModal(); | ||
| 14 | + var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); | ||
| 15 | +- $scope.profile = resp.data.person; | ||
| 16 | ++ $scope.profile = resp.data.user.person; | ||
| 17 | + $scope.setStateAndCityOfProfile(); | ||
| 18 | + popup.then(function() { | ||
| 19 | +- $scope.loginCallback(resp.data.private_token); | ||
| 20 | ++ $scope.loginCallback(resp.data.user.private_token); | ||
| 21 | + }); | ||
| 22 | + }, function(err) { | ||
| 23 | + $scope.closeModal(); |
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.user.person; | 124 | + $scope.profile = resp.data.person; |
| 125 | $scope.setStateAndCityOfProfile(); | 125 | $scope.setStateAndCityOfProfile(); |
| 126 | popup.then(function() { | 126 | popup.then(function() { |
| 127 | - $scope.loginCallback(resp.data.user.private_token); | 127 | + $scope.loginCallback(resp.data.private_token); |
| 128 | }); | 128 | }); |
| 129 | }, function(err) { | 129 | }, function(err) { |
| 130 | $scope.closeModal(); | 130 | $scope.closeModal(); |