mirror of
https://github.com/scratchfoundation/node-redis-rate-limiter.git
synced 2025-06-28 10:40:20 -04:00
Better defaults
This commit is contained in:
parent
f9fbd354f3
commit
a73820b281
2 changed files with 4 additions and 5 deletions
|
@ -29,11 +29,10 @@ var getWindow = function(opts){
|
||||||
};
|
};
|
||||||
|
|
||||||
var getStatus = function(opts){
|
var getStatus = function(opts){
|
||||||
if ("status" in opts) {
|
if (!("status" in opts)) {
|
||||||
return opts.status;
|
opts.status = 429;
|
||||||
} else {
|
|
||||||
return 429;
|
|
||||||
}
|
}
|
||||||
|
return opts.status;
|
||||||
};
|
};
|
||||||
|
|
||||||
var getKey = function(opts){
|
var getKey = function(opts){
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "node-redis-rate-limiter",
|
"name": "node-redis-rate-limiter",
|
||||||
"version": "1.2.3",
|
"version": "1.2.4",
|
||||||
"description": "Rate-limit any operation, backed by Redis",
|
"description": "Rate-limit any operation, backed by Redis",
|
||||||
"author": "Scratch Foundation",
|
"author": "Scratch Foundation",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue