Better defaults

This commit is contained in:
Colby Gutierrez-Kraybill 2023-02-28 22:02:35 -05:00
parent f9fbd354f3
commit a73820b281
2 changed files with 4 additions and 5 deletions

View file

@ -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){

View file

@ -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",