diff --git a/src/apps.js b/src/apps.js index c279a17cb..1e2b91788 100644 --- a/src/apps.js +++ b/src/apps.js @@ -718,8 +718,6 @@ function install(data, user, auditSource, callback) { robotsTxt = data.robotsTxt || null, enableBackup = 'enableBackup' in data ? data.enableBackup : true, enableAutomaticUpdate = 'enableAutomaticUpdate' in data ? data.enableAutomaticUpdate : true, - backupId = data.backupId || null, - backupFormat = data.backupFormat || 'tgz', alternateDomains = data.alternateDomains || [], env = data.env || {}, mailboxName = data.mailboxName || '', @@ -753,9 +751,6 @@ function install(data, user, auditSource, callback) { error = validateRobotsTxt(robotsTxt); if (error) return callback(error); - error = validateBackupFormat(backupFormat); - if (error) return callback(error); - error = validateLabel(label); if (error) return callback(error); @@ -811,7 +806,7 @@ function install(data, user, auditSource, callback) { label: label, tags: tags, runState: exports.RSTATE_RUNNING, - installationState: backupId ? exports.ISTATE_PENDING_RESTORE : exports.ISTATE_PENDING_INSTALL + installationState: exports.ISTATE_PENDING_INSTALL }; appdb.add(appId, appStoreId, manifest, location, domain, translatePortBindings(portBindings, manifest), data, function (error) { @@ -828,14 +823,13 @@ function install(data, user, auditSource, callback) { if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, 'Error setting cert: ' + error.message)); } - const restoreConfig = backupId ? { backupId: backupId, backupFormat: backupFormat } : null; const task = { - args: { restoreConfig, overwriteDns }, + args: { restoreConfig: null, overwriteDns }, values: { }, - requiredState: data.installationState + requiredState: exports.ISTATE_PENDING_INSTALL }; - addTask(appId, data.installationState, task, function (error, result) { + addTask(appId, exports.ISTATE_PENDING_INSTALL, task, function (error, result) { if (error) return callback(error); const newApp = _.extend({}, data, { appStoreId, manifest, location, domain, portBindings }); diff --git a/src/routes/apps.js b/src/routes/apps.js index ce4407a9d..2f28c554d 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -121,9 +121,6 @@ function installApp(req, res, next) { if (('portBindings' in data) && typeof data.portBindings !== 'object') return next(new HttpError(400, 'portBindings must be an object')); if ('icon' in data && typeof data.icon !== 'string') return next(new HttpError(400, 'icon is not a string')); - if (data.backupId && typeof data.backupId !== 'string') return next(new HttpError(400, 'backupId must be string or null')); - if (data.backupFormat && typeof data.backupFormat !== 'string') return next(new HttpError(400, 'backupFormat must be string or null')); - if ('label' in data && typeof data.label !== 'string') return next(new HttpError(400, 'label must be a string')); // falsy values in cert and key unset the cert