restore: encrypted filenames

This commit is contained in:
Girish Ramakrishnan
2022-06-27 09:17:01 -07:00
parent 34ff3462e9
commit 55e2139c69
6 changed files with 9 additions and 8 deletions

View File

@@ -73,10 +73,8 @@ async function setBackupConfig(req, res, next) {
if (typeof req.body.provider !== 'string') return next(new HttpError(400, 'provider is required'));
if (typeof req.body.schedulePattern !== 'string') return next(new HttpError(400, 'schedulePattern is required'));
if ('password' in req.body) {
if (typeof req.body.password !== 'string') return next(new HttpError(400, 'password must be a string'));
if (typeof req.body.encryptFilenames !== 'boolean') return next(new HttpError(400, 'encryptFilenames must be a boolean'));
}
if ('password' in req.body && typeof req.body.password !== 'string') return next(new HttpError(400, 'password must be a string'));
if ('encryptedFilenames' in req.body && typeof req.body.encryptedFilenames !== 'boolean') return next(new HttpError(400, 'encryptedFilenames must be a boolean'));
if ('syncConcurrency' in req.body) {
if (typeof req.body.syncConcurrency !== 'number') return next(new HttpError(400, 'syncConcurrency must be a positive integer'));