sysinfoConfig is now non-optional

This commit is contained in:
Girish Ramakrishnan
2019-11-11 11:05:34 -08:00
parent 815392ba38
commit fd51320fb7
2 changed files with 4 additions and 4 deletions

View File

@@ -131,7 +131,7 @@ function setup(dnsConfig, sysinfoConfig, auditSource, callback) {
async.series([
autoRegister.bind(null, domain),
(next) => { if (!sysinfoConfig) return next(); settings.setSysinfoConfig(sysinfoConfig, next); },
settings.setSysinfoConfig.bind(null, sysinfoConfig),
domains.prepareDashboardDomain.bind(null, domain, auditSource, (progress) => setProgress('setup', progress.message, NOOP_CALLBACK)),
cloudron.setDashboardDomain.bind(null, domain, auditSource),
mail.addDomain.bind(null, domain), // this relies on settings.mailFqdn() and settings.adminDomain()
@@ -239,7 +239,7 @@ function restore(backupConfig, backupId, version, sysinfoConfig, auditSource, ca
async.series([
setProgress.bind(null, 'restore', 'Downloading backup'),
backups.restore.bind(null, backupConfig, backupId, (progress) => setProgress('restore', progress.message, NOOP_CALLBACK)),
(next) => { if (!sysinfoConfig) return next(); settings.setSysinfoConfig(sysinfoConfig, next); },
settings.setSysinfoConfig.bind(null, sysinfoConfig),
cloudron.setupDashboard.bind(null, auditSource, (progress) => setProgress('restore', progress.message, NOOP_CALLBACK)),
settings.setBackupConfig.bind(null, backupConfig), // update with the latest backupConfig
eventlog.add.bind(null, eventlog.ACTION_RESTORE, auditSource, { backupId }),