diff --git a/lib/api/bucketUpdateQuota.js b/lib/api/bucketUpdateQuota.js index 64d507dff2..89273feb05 100644 --- a/lib/api/bucketUpdateQuota.js +++ b/lib/api/bucketUpdateQuota.js @@ -27,7 +27,7 @@ function parseRequestBody(requestBody, next) { } return next(null, jsonData); } catch (jsonError) { - parseString(requestBody, (xmlError, xmlData) => { + return parseString(requestBody, (xmlError, xmlData) => { if (xmlError) { return next(errors.InvalidArgument.customizeDescription('Request body must be a JSON object')); } @@ -54,7 +54,8 @@ function bucketUpdateQuota(authInfo, request, log, callback) { return next(err, bucket); }), (bucket, next) => parseRequestBody(request.post, (err, requestBody) => next(err, bucket, requestBody)), - (bucket, requestBody, next) => validateBucketQuotaProperty(requestBody, (err, quotaValue) => next(err, bucket, quotaValue)), + (bucket, requestBody, next) => validateBucketQuotaProperty(requestBody, (err, quotaValue) => + next(err, bucket, quotaValue)), (bucket, quotaValue, next) => { bucket.setQuota(quotaValue); return metadata.updateBucket(bucket.getName(), bucket, log, next); @@ -82,4 +83,4 @@ function bucketUpdateQuota(authInfo, request, log, callback) { }); } -module.exports = bucketUpdateQuota; \ No newline at end of file +module.exports = bucketUpdateQuota;