From 7562257e843b14dc0fc13ea524f44c7bb3904d80 Mon Sep 17 00:00:00 2001 From: Caio SBA Date: Mon, 28 Sep 2015 11:47:57 -0300 Subject: [PATCH] Reverting new login and adding patch to be applied when server is updated --- new-login.patch | 23 +++++++++++++++++++++++ www/js/controllers.js | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 new-login.patch diff --git a/new-login.patch b/new-login.patch new file mode 100644 index 0000000..51e4d16 --- /dev/null +++ b/new-login.patch @@ -0,0 +1,23 @@ +commit ba284fcd8361ddd9934acd87b81c107e0e6e5b8e +Author: Caio SBA +Date: Mon Sep 28 11:27:49 2015 -0300 + + Fixing login + +diff --git a/www/js/controllers.js b/www/js/controllers.js +index ff5fd08..d17a203 100644 +--- a/www/js/controllers.js ++++ b/www/js/controllers.js +@@ -121,10 +121,10 @@ angular.module('confjuvapp.controllers', []) + .then(function(resp) { + $scope.closeModal(); + var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); +- $scope.profile = resp.data.person; ++ $scope.profile = resp.data.user.person; + $scope.setStateAndCityOfProfile(); + popup.then(function() { +- $scope.loginCallback(resp.data.private_token); ++ $scope.loginCallback(resp.data.user.private_token); + }); + }, function(err) { + $scope.closeModal(); diff --git a/www/js/controllers.js b/www/js/controllers.js index c18ef02..730a04b 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -121,10 +121,10 @@ angular.module('confjuvapp.controllers', []) .then(function(resp) { $scope.closeModal(); var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); - $scope.profile = resp.data.user.person; + $scope.profile = resp.data.person; $scope.setStateAndCityOfProfile(); popup.then(function() { - $scope.loginCallback(resp.data.user.private_token); + $scope.loginCallback(resp.data.private_token); }); }, function(err) { $scope.closeModal(); -- libgit2 0.21.2