restore: add sysinfoConfig

This commit is contained in:
Girish Ramakrishnan
2019-11-11 09:49:18 -08:00
parent f8c110f75c
commit 815392ba38
2 changed files with 6 additions and 2 deletions

View File

@@ -102,7 +102,9 @@ function restore(req, res, next) {
if (typeof req.body.backupId !== 'string') return next(new HttpError(400, 'backupId must be a string or null'));
if (typeof req.body.version !== 'string') return next(new HttpError(400, 'version must be a string'));
provision.restore(backupConfig, req.body.backupId, req.body.version, auditSource.fromRequest(req), function (error) {
if ('sysinfoConfig' in req.body && typeof req.body.sysinfoConfig !== 'object') return next(new HttpError(400, 'sysinfoConfig must be an object'));
provision.restore(backupConfig, req.body.backupId, req.body.version, req.body.sysinfoConfig || null, auditSource.fromRequest(req), function (error) {
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, {}));