From e1e885d6b23fc690b4e0cb9217094b5f20afea2f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Feb 2023 10:55:15 +0900 Subject: [PATCH] refactor: fix types --- packages/backend/src/server/api/RateLimiterService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/RateLimiterService.ts b/packages/backend/src/server/api/RateLimiterService.ts index a9c34e363a..1f8915ecca 100644 --- a/packages/backend/src/server/api/RateLimiterService.ts +++ b/packages/backend/src/server/api/RateLimiterService.ts @@ -34,7 +34,7 @@ export class RateLimiterService { const min = (): void => { const minIntervalLimiter = new Limiter({ id: `${actor}:${limitation.key}:min`, - duration: limitation.minInterval * factor, + duration: limitation.minInterval! * factor, max: 1, db: this.redisClient, }); @@ -62,8 +62,8 @@ export class RateLimiterService { const max = (): void => { const limiter = new Limiter({ id: `${actor}:${limitation.key}`, - duration: limitation.duration * factor, - max: limitation.max / factor, + duration: limitation.duration! * factor, + max: limitation.max! / factor, db: this.redisClient, });