backups: fix restore code path after backup id changes
This commit is contained in:
@@ -481,8 +481,8 @@ async function importApp(req, res, next) {
|
||||
|
||||
const data = req.body;
|
||||
|
||||
if ('backupId' in data) { // if not provided, we import in-place
|
||||
if (typeof data.backupId !== 'string') return next(new HttpError(400, 'backupId must be string'));
|
||||
if ('remotePath' in data) { // if not provided, we import in-place
|
||||
if (typeof data.remotePath !== 'string') return next(new HttpError(400, 'remotePath must be string'));
|
||||
if (typeof data.backupFormat !== 'string') return next(new HttpError(400, 'backupFormat must be string'));
|
||||
|
||||
if ('backupConfig' in data && typeof data.backupConfig !== 'object') return next(new HttpError(400, 'backupConfig must be an object'));
|
||||
|
||||
Reference in New Issue
Block a user