Item auth_params

This commit is contained in:
Mo Bitar
2018-07-06 23:35:32 -05:00
parent 6fe08106ed
commit 7339c7c77f
9 changed files with 13 additions and 30 deletions

View File

@@ -17,14 +17,12 @@ class ArchiveManager {
if(this.authManager.offline() && this.passcodeManager.hasPasscode()) {
keys = this.passcodeManager.keys();
authParams = this.passcodeManager.passcodeAuthParams();
protocolVersion = authParams.version;
} else {
keys = await this.authManager.keys();
authParams = this.authManager.getAuthParams();
protocolVersion = await this.authManager.protocolVersion();
authParams = await this.authManager.getAuthParams();
}
}
this.__itemsData(keys, authParams, protocolVersion).then((data) => {
this.__itemsData(keys, authParams).then((data) => {
this.__downloadData(data, `SN Archive - ${new Date()}.txt`);
// download as zipped plain text files
@@ -39,8 +37,8 @@ class ArchiveManager {
Private
*/
async __itemsData(keys, authParams, protocolVersion) {
let data = await this.modelManager.getAllItemsJSONData(keys, authParams, protocolVersion);
async __itemsData(keys, authParams) {
let data = await this.modelManager.getAllItemsJSONData(keys, authParams);
let blobData = new Blob([data], {type: 'text/json'});
return blobData;
}