volos-quota-common
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -59,9 +59,7 @@ /**************************************************************************** | ||
function(err, reply) { | ||
if (err) { | ||
if (debugEnabled) { debug('Quota apply error: ' + err); } | ||
return resp.send(500, { error: 'error applying quota' }); | ||
} | ||
if (err) { return next(err); } | ||
if (!reply.isAllowed) { | ||
if (debugEnabled) { debug('Quota exceeded: ' + id); } | ||
return resp.send(403, { error: 'exceeded quota ' }); | ||
resp.statusCode = 403; | ||
return resp.end(JSON.stringify({ error: 'exceeded quota' })); | ||
} | ||
@@ -87,9 +85,6 @@ next(); | ||
function(err, reply) { | ||
if (err) { | ||
if (debugEnabled) { debug('Quota apply error: ' + err); } | ||
return resp.send(500, { error: 'error applying quota' }); | ||
} | ||
if (err) { return next(err); } | ||
if (!reply.isAllowed) { | ||
if (debugEnabled) { debug('Quota exceeded: ' + options.identifier); } | ||
return resp.send(403, { error: 'exceeded quota ' }); | ||
resp.statusCode = 403; | ||
return resp.end(JSON.stringify({ error: 'exceeded quota' })); | ||
} | ||
@@ -96,0 +91,0 @@ next(); |
{ | ||
"name": "volos-quota-common", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"main": "lib/quota.js", | ||
@@ -12,3 +12,5 @@ "license": "MIT", | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"underscore": "1.6.x" | ||
}, | ||
"devDependencies": {}, | ||
@@ -15,0 +17,0 @@ "repository": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
23270
1
502
+ Addedunderscore@1.6.x
+ Addedunderscore@1.6.0(transitive)