backups: add mounting config
This commit is contained in:
@@ -8,7 +8,7 @@ exports = module.exports = {
|
||||
setBackupConfig
|
||||
};
|
||||
|
||||
var assert = require('assert'),
|
||||
const assert = require('assert'),
|
||||
backups = require('../backups.js'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
docker = require('../docker.js'),
|
||||
@@ -106,6 +106,9 @@ function setBackupConfig(req, res, next) {
|
||||
|
||||
if (!req.body.retentionPolicy || typeof req.body.retentionPolicy !== 'object') return next(new HttpError(400, 'retentionPolicy is required'));
|
||||
|
||||
if ('mountType' in req.body && typeof req.body.mountType !== 'string') return next(new HttpError(400, 'mountType must be a string'));
|
||||
if ('mountOptions' in req.body && typeof req.body.mountOptions !== 'object') return next(new HttpError(400, 'mountOptions must be a object'));
|
||||
|
||||
// testing the backup using put/del takes a bit of time at times
|
||||
req.clearTimeout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user