Skip to content

Commit

Permalink
Use function getBack in .then instead of result of that function
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Apr 12, 2017
1 parent b86fb7c commit 7ef6327
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window',

vm.saveClicked = function(angularForm) {
API.put('/api/authentications/' + credentialId, vm.credentialModel)
.then(getBack(sprintf(__("Modification of Credential \"%s\" has been successfully queued."), vm.credentialModel.name), false))
.then(getBack.bind(vm, sprintf(__("Modification of Credential \"%s\" has been successfully queued."), vm.credentialModel.name), false, false))
.catch(miqService.handleFailure);
};

vm.addClicked = function(angularForm) {
API.post('/api/authentications/', vm.credentialModel)
.then(getBack(sprintf(__("Add of Credential \"%s\" has been successfully queued."), vm.credentialModel.name)))
.then(getBack.bind(vm, sprintf(__("Add of Credential \"%s\" has been successfully queued."), vm.credentialModel.name), false, false))
.catch(miqService.handleFailure);
};

Expand Down

0 comments on commit 7ef6327

Please sign in to comment.