refactor: fix types
This commit is contained in:
parent
5b6695114f
commit
e1e885d6b2
@ -34,7 +34,7 @@ export class RateLimiterService {
|
|||||||
const min = (): void => {
|
const min = (): void => {
|
||||||
const minIntervalLimiter = new Limiter({
|
const minIntervalLimiter = new Limiter({
|
||||||
id: `${actor}:${limitation.key}:min`,
|
id: `${actor}:${limitation.key}:min`,
|
||||||
duration: limitation.minInterval * factor,
|
duration: limitation.minInterval! * factor,
|
||||||
max: 1,
|
max: 1,
|
||||||
db: this.redisClient,
|
db: this.redisClient,
|
||||||
});
|
});
|
||||||
@ -62,8 +62,8 @@ export class RateLimiterService {
|
|||||||
const max = (): void => {
|
const max = (): void => {
|
||||||
const limiter = new Limiter({
|
const limiter = new Limiter({
|
||||||
id: `${actor}:${limitation.key}`,
|
id: `${actor}:${limitation.key}`,
|
||||||
duration: limitation.duration * factor,
|
duration: limitation.duration! * factor,
|
||||||
max: limitation.max / factor,
|
max: limitation.max! / factor,
|
||||||
db: this.redisClient,
|
db: this.redisClient,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user