From 98a92f51e6715e64846125c2b0469d3d39e2e43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Mart=C3=ADn?= Date: Mon, 26 Feb 2018 17:17:01 +0100 Subject: [PATCH] make jshint happy --- lib/cartodb/middleware/rate-limit.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cartodb/middleware/rate-limit.js b/lib/cartodb/middleware/rate-limit.js index 6016cb47..de394dce 100644 --- a/lib/cartodb/middleware/rate-limit.js +++ b/lib/cartodb/middleware/rate-limit.js @@ -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;