Skip to content

Commit

Permalink
Merge pull request #1288 from eciis/fix-reload-page-when-password-inc…
Browse files Browse the repository at this point in the history
…orrect

Fix reload page when user place incorrect password
  • Loading branch information
JuliePessoa authored Oct 25, 2018
2 parents 34e8eaf + b657c41 commit 97b6bed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions frontend/auth/authService.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@
service.sendEmailVerification(user);
throw "Error! Email not verified.";
}
}).catch(function(error) {
MessageService.showToast(error);
return error;
});
}

Expand Down
8 changes: 6 additions & 2 deletions frontend/auth/loginController.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var app = angular.module("app");

app.controller("LoginController", function LoginController(AuthService, $state, $mdDialog,
$stateParams, $window) {
$stateParams, $window, MessageService) {
var loginCtrl = this;

loginCtrl.user = {};
Expand All @@ -17,6 +17,8 @@
var promise = AuthService.loginWithGoogle();
promise.then(function success() {
redirectTo(redirectPath);
}).catch(function(error) {
MessageService.showToast(error);
});
return promise;
};
Expand All @@ -30,7 +32,9 @@
function success() {
redirectTo(redirectPath);
}
);
).catch(function(error) {
MessageService.showToast(error);
});
};

loginCtrl.redirect = function success() {
Expand Down

0 comments on commit 97b6bed

Please sign in to comment.