diff options
author | Marcos Zuriaga <wolfi@wolfi.es> | 2016-10-06 22:03:05 +0300 |
---|---|---|
committer | Marcos Zuriaga <wolfi@wolfi.es> | 2016-10-06 22:03:05 +0300 |
commit | 3270b7be4c0d0e253488e4d1fa0492c1648d664d (patch) | |
tree | e6e554a8febae4b83bcbc9fdedddac430b52b45d /js/app/services/credentialservice.js | |
parent | de5dc22efc6c171eacc411be9b2d952dac50ce32 (diff) |
Now the .then of encryptcredential holds encrypted and plain text credential
Diffstat (limited to 'js/app/services/credentialservice.js')
-rw-r--r-- | js/app/services/credentialservice.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/js/app/services/credentialservice.js b/js/app/services/credentialservice.js index a2d986b1..4a7c3db0 100644 --- a/js/app/services/credentialservice.js +++ b/js/app/services/credentialservice.js @@ -182,7 +182,10 @@ angular.module('passmanApp') // Save data service.updateCredential(this.parent.new_credential_cryptogram, true).then((function(data){ this.call_progress(new progress_datatype(2, 2)); - this.call_then(this.parent.plain_credential); + this.call_then({ + plain_text: this.parent.plain_credential, + cryptogram: this.parent.new_credential_cryptogram + }); }).bind(this)); }).bind(this)); }; @@ -269,21 +272,24 @@ angular.module('passmanApp') this.new_password = master_promise.new_password; this.plain_credential = master_promise.plain_credential; }; + this.credential_data = {}; (new C_Promise(promise_credential_update, new password_data())).progress(function(data){ master_promise.call_progress(data); }).then(function(data){ console.warn("End credential update"); - master_promise.plain_credential = data; + master_promise.plain_credential = data.plain_text; master_promise.promises ++; + this.credential_data = data; + (new C_Promise(promise_files_update, new password_data())).progress(function(data){ master_promise.call_progress(data); }).then(function(data){ console.warn("End files update"); master_promise.promises --; if (master_promise.promises == 0){ - master_promise.call_then("All done"); + master_promise.call_then(master_promise.credential_data); } }); @@ -294,7 +300,7 @@ angular.module('passmanApp') console.warn("End revisions update"); master_promise.promises --; if (master_promise.promises == 0){ - master_promise.call_then("All done"); + master_promise.call_then(master_promise.credential_data); } }); }); |