app archive: fix download config

This commit is contained in:
Girish Ramakrishnan
2025-10-06 22:31:17 +02:00
parent b3eb6ccde3
commit 28c0d63f89
5 changed files with 27 additions and 36 deletions
+15
View File
@@ -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];
}
};
}