@wrcb/cb-common 1.0.124 → 1.0.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,12 @@ function createRateApiLimiter(options) {
24
24
  legacyHeaders: false,
25
25
  store: new rate_limit_redis_1.default({
26
26
  prefix,
27
- sendCommand: (command, args) => redisClient.call(command, Array.isArray(args) ? args : [args])
27
+ // 👇 Corrigido para aceitar `args` como string
28
+ sendCommand: (command, args) => {
29
+ // 👇 ioredis.call() espera o comando + argumentos como lista separada
30
+ const splitArgs = Array.isArray(args) ? args : [args];
31
+ return redisClient.call(command, ...splitArgs);
32
+ }
28
33
  }),
29
34
  handler: function handleRateLimitExceeded(req, res, next) {
30
35
  next(new tooManyRequestsError_1.TooManyRequestsError(errorMessage));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.124",
3
+ "version": "1.0.126",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",