mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
convert auth service profile methods to promises
This commit is contained in:
@@ -36,15 +36,17 @@
|
||||
|
||||
$scope.generalSave = function () {
|
||||
$scope.generalPromise = apiService.accounts.putProfile({}, $scope.model.profile, function (profile) {
|
||||
authService.setUserProfile(profile);
|
||||
toastr.success('Account has been updated.', 'Success!');
|
||||
authService.setUserProfile(profile).then(function (updatedProfile) {
|
||||
toastr.success('Account has been updated.', 'Success!');
|
||||
});
|
||||
}).$promise;
|
||||
};
|
||||
|
||||
$scope.passwordHintSave = function () {
|
||||
$scope.passwordHintPromise = apiService.accounts.putProfile({}, $scope.model.profile, function (profile) {
|
||||
authService.setUserProfile(profile);
|
||||
toastr.success('Account has been updated.', 'Success!');
|
||||
authService.setUserProfile(profile).then(function (updatedProfile) {
|
||||
toastr.success('Account has been updated.', 'Success!');
|
||||
});
|
||||
}).$promise;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user