Mount API fixes
This commit is contained in:
@@ -770,7 +770,7 @@ function setMounts(req, res, next) {
|
||||
assert.strictEqual(typeof req.body, 'object');
|
||||
assert.strictEqual(typeof req.resource, 'object');
|
||||
|
||||
if (Array.isArray(req.body.mounts)) return next(new HttpError(400, 'mounts should be an array'));
|
||||
if (!Array.isArray(req.body.mounts)) return next(new HttpError(400, 'mounts should be an array'));
|
||||
for (let m of req.body.mounts) {
|
||||
if (!m || typeof m !== 'object') return next(new HttpError(400, 'mounts must be an object'));
|
||||
if (typeof m.volumeId !== 'string') return next(new HttpError(400, 'volumeId must be a string'));
|
||||
|
||||
Reference in New Issue
Block a user