make jshint happy
This commit is contained in:
parent
ae50dbd47c
commit
98a92f51e6
@ -83,10 +83,10 @@ function rateLimitMiddleware(metadataBackend, endpointGroup = null) {
|
||||
/**
|
||||
* Returns the endpoint key in Redis
|
||||
*/
|
||||
function getEndpointGroup() {
|
||||
// TODO: get endpoint from route path
|
||||
return null;
|
||||
}
|
||||
// function getEndpointGroup() {
|
||||
// // TODO: get endpoint from route path
|
||||
// return null;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns Redis key where the limits are saved by user and endpoint
|
||||
@ -139,6 +139,7 @@ function getLuaScript() {
|
||||
* isBloqued, limit, remaining, retry, reset
|
||||
*/
|
||||
function getLowerRateLimit(ratelimits) {
|
||||
/*jshint maxcomplexity:10 */
|
||||
if (!ratelimits || !Array.isArray(ratelimits) || !ratelimits.length) {
|
||||
return;
|
||||
}
|
||||
@ -182,6 +183,7 @@ function isRateLimitEnabledByEndpoint(endpointGroup) {
|
||||
return global.environment.enabledFeatures.rateLimitsByEndpoint[endpointGroup] === true;
|
||||
}
|
||||
|
||||
|
||||
module.exports.rateLimitMiddleware = rateLimitMiddleware;
|
||||
module.exports.RATE_LIMIT_ENDPOINTS_GROUPS = RATE_LIMIT_ENDPOINTS_GROUPS;
|
||||
module.exports.getStoreKey = getStoreKey;
|
||||
|
Loading…
Reference in New Issue
Block a user