settings: move backup settings

This commit is contained in:
Girish Ramakrishnan
2023-08-04 11:24:28 +05:30
parent 77c66d9a02
commit e73b75e4b5
20 changed files with 535 additions and 580 deletions

View File

@@ -1208,7 +1208,7 @@ async function scheduleTask(appId, installationState, taskId, auditSource) {
assert.strictEqual(typeof taskId, 'string');
assert.strictEqual(typeof auditSource, 'object');
const backupConfig = await settings.getBackupConfig();
const backupConfig = await backups.getConfig();
let memoryLimit = 400;
if (installationState === exports.ISTATE_PENDING_BACKUP || installationState === exports.ISTATE_PENDING_CLONE || installationState === exports.ISTATE_PENDING_RESTORE
@@ -2678,7 +2678,7 @@ async function getBackupDownloadStream(app, backupId) {
if (backup.identifier !== app.id) throw new BoxError(BoxError.NOT_FOUND, 'Backup not found'); // some other app's backup
if (backup.format !== 'tgz') throw new BoxError(BoxError.BAD_STATE, 'only tgz backups can be downloaded');
const backupConfig = await settings.getBackupConfig();
const backupConfig = await backups.getConfig();
const ps = new PassThrough();