backupSite: enableForUpdates in add

This commit is contained in:
Girish Ramakrishnan
2025-09-23 10:21:43 +02:00
parent d08d4962a5
commit 08f7685ca3
2 changed files with 4 additions and 2 deletions

View File

@@ -513,7 +513,7 @@ async function add(data, auditSource) {
if (constants.DEMO) throw new BoxError(BoxError.BAD_STATE, 'Not allowed in demo mode');
const { provider, name, config, format, contents, retention, schedule, enabledForUpdates } = data; // required
const { provider, name, config, format, contents, retention, schedule, enableForUpdates } = data; // required
const limits = data.limits || null,
encryptionPassword = data.encryptionPassword || null,
encryptedFilenames = data.encryptedFilenames || false,
@@ -549,7 +549,7 @@ async function add(data, auditSource) {
const sanitizedConfig = await storageApi({ provider }).verifyConfig({id, provider, config });
await database.query('INSERT INTO backupSites (id, name, provider, configJson, contentsJson, limitsJson, integrityKeyPairJson, retentionJson, schedule, encryptionJson, format, enabledForUpdates) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
[ id, name, provider, JSON.stringify(sanitizedConfig), JSON.stringify(contents), JSON.stringify(limits), JSON.stringify(integrityKeyPair), JSON.stringify(retention), schedule, JSON.stringify(encryption), format, enabledForUpdates ]);
[ id, name, provider, JSON.stringify(sanitizedConfig), JSON.stringify(contents), JSON.stringify(limits), JSON.stringify(integrityKeyPair), JSON.stringify(retention), schedule, JSON.stringify(encryption), format, enableForUpdates ]);
debug('add: setting up new storage configuration');
await storageApi({ provider }).setup(sanitizedConfig);