@onfleet/node-onfleet
Advanced tools
Comparing version 1.0.9 to 1.1.0
@@ -22,5 +22,7 @@ const Bottleneck = require('bottleneck'); | ||
const reassignRate = (newRate) => { | ||
limiter.updateSettings({ | ||
reservoirRefreshAmount: newRate, | ||
}); | ||
if (newRate > 0) { | ||
limiter.updateSettings({ | ||
reservoirRefreshAmount: newRate, | ||
}); | ||
} | ||
}; | ||
@@ -102,5 +104,6 @@ | ||
}).then((res) => { | ||
// On response, update the rate | ||
reassignRate(res.headers.get('x-ratelimit-remaining')); | ||
if (res.ok) { | ||
// On response, update the rate | ||
reassignRate(res.headers.get('x-ratelimit-remaining')); | ||
// Return status code for deletion as the API does, else, return the body of the response | ||
@@ -107,0 +110,0 @@ return operations === 'DELETE' ? res.status : res.json(); |
{ | ||
"name": "@onfleet/node-onfleet", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "Official client library for accessing the Onfleet API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65077
926