This commit is contained in:
Girish Ramakrishnan
2025-12-02 15:16:21 +01:00
parent e24ee05337
commit 964fb5d251
+1 -1
View File
@@ -111,7 +111,7 @@ async function restore(req, res, next) {
const backupConfig = req.body.backupConfig;
if (typeof backupConfig.provider !== 'string') return next(new HttpError(400, 'backupConfig.provider is required'));
if (typeof backupConfig.format !== 'string') return next(new HttpError(400, 'backupConfig.format must be a string'));
if (typeof backupConfig.config !== 'object') return next(new HttpError(400, 'backupConfig.config must be a string'));
if (typeof backupConfig.config !== 'object') return next(new HttpError(400, 'backupConfig.config must be an object'));
if ('encryptionPassword' in backupConfig && typeof backupConfig.encryptionPassword !== 'string') return next(new HttpError(400, 'backupConfig.encryptionPassword must be a string'));
if ('encryptedFilenames' in req.body && typeof req.body.encryptedFilenames !== 'boolean') return next(new HttpError(400, 'backupConfig.encryptedFilenames must be a boolean'));