mirror of
https://github.com/scratchfoundation/node-redis-rate-limiter.git
synced 2025-06-12 19:50:19 -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){
|
||||
if ("status" in opts) {
|
||||
return opts.status;
|
||||
} else {
|
||||
return 429;
|
||||
if (!("status" in opts)) {
|
||||
opts.status = 429;
|
||||
}
|
||||
return opts.status;
|
||||
};
|
||||
|
||||
var getKey = function(opts){
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "node-redis-rate-limiter",
|
||||
"version": "1.2.3",
|
||||
"version": "1.2.4",
|
||||
"description": "Rate-limit any operation, backed by Redis",
|
||||
"author": "Scratch Foundation",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue