Skip to content
Snippets Groups Projects
Commit e1e885d6 authored by syuilo's avatar syuilo
Browse files

refactor: fix types

parent 5b669511
No related branches found
No related tags found
No related merge requests found
......@@ -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,
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment