From 9852dec3d13246a83f01dc1343cd1bfac4638e52 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Tue, 12 Jul 2022 10:30:36 +0700 Subject: [PATCH] chore: RateLimiter clean ups --- controllers/middlewares/rateLimiter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/middlewares/rateLimiter.js b/controllers/middlewares/rateLimiter.js index ad288b5..ac85961 100644 --- a/controllers/middlewares/rateLimiter.js +++ b/controllers/middlewares/rateLimiter.js @@ -2,9 +2,10 @@ const { RateLimiterMemory } = require('rate-limiter-flexible') const ClientError = require('./../utils/ClientError') class RateLimiter { + rateLimiterMemory + #requestKey #whitelistedKeys - rateLimiterMemory constructor (requestKey, options = {}, whitelistedKeys) { if (typeof options.points !== 'number' || typeof options.duration !== 'number') {