restore from the backup's config.json
To summarize what we are doing is that restore is simply getting old data and old code. Config is not changed. If config is required, then it has to come in the restore REST parameter. Otherwise, there is too much magic. https://blog.smartserver.io/2016/06/13/app-restore/
This commit is contained in:
+2
-1
@@ -178,7 +178,8 @@ function restoreApp(req, res, next) {
|
||||
|
||||
debug('Restore app id:%s', req.params.id);
|
||||
|
||||
if ('backupId' in data && typeof data.backupId !== 'string') return next(new HttpError(400, 'backupId must be string'));
|
||||
if (!('backupId' in req.body)) return next(new HttpError(400, 'backupId is required'));
|
||||
if (data.backupId !== null && typeof data.backupId !== 'string') return next(new HttpError(400, 'backupId must be string or null'));
|
||||
|
||||
apps.restore(req.params.id, data, auditSource(req), function (error) {
|
||||
if (error && error.reason === AppsError.NOT_FOUND) return next(new HttpError(404, 'No such app'));
|
||||
|
||||
Reference in New Issue
Block a user