Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
Fix bug with change password (#16)
Browse files Browse the repository at this point in the history
* Fix several bugs with changing passwords

* Increase pom version
  • Loading branch information
pavel-luhin authored Apr 11, 2018
1 parent 0c54d55 commit 86baf8c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>by.bsu.rfe</groupId>
<artifactId>sms-server</artifactId>
<version>1.3.5</version>
<version>1.3.6</version>

<packaging>war</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
$scope.selected.credentials = {};

$scope.changePassword = function (oldPassword, newPassword, anotherNewPassword) {
if (!oldPassword || !newPassword || !anotherNewPassword || newPassword != anotherNewPassword) {

if (!oldPassword ||
!newPassword ||
!anotherNewPassword ||
newPassword !== anotherNewPassword ||
newPassword === oldPassword
) {
toaster.pop({
type: 'error',
title: 'Error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
};

function changePassword(password) {
return $http.post(RestURLFactory.CHANGE_PASSWORD, passObj);
return $http.post(RestURLFactory.CHANGE_PASSWORD, password);
}
}
})();

0 comments on commit 86baf8c

Please sign in to comment.