app archive: fix download config
This commit is contained in:
@@ -190,6 +190,21 @@ function create() {
|
||||
if (error || result.status !== 202) return [error || result];
|
||||
return [null, result.body];
|
||||
},
|
||||
async generateBackupConfig(backupOrArchive) {
|
||||
const [backupSiteError, backupSite] = await this.get(backupOrArchive.siteId);
|
||||
if (backupSiteError) return [backupSiteError];
|
||||
|
||||
const config = {
|
||||
remotePath: backupOrArchive.remotePath
|
||||
};
|
||||
|
||||
for (const k of ['provider', 'config', 'limits', 'format', 'encrypted', 'encryptedFilenames', 'encryptionPasswordHint']) {
|
||||
config[k] = backupSite[k];
|
||||
}
|
||||
|
||||
config.siteId = backupSite.id;
|
||||
return [null, config];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user