Skip to content

Commit

Permalink
Add getRateLimitAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Apr 16, 2024
1 parent f0a654a commit a6f130c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Support/Concerns/WithRateLimiting.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ protected function rateLimit(): void
protected static function incrementRateLimiter(): void
{
RateLimiter::increment(
static::getRateLimitKey(),
static::getDecaySeconds()
key: static::getRateLimitKey(),
decaySeconds: static::getDecaySeconds(),
amount: static::getRateLimitAmount(),
);
}

Expand All @@ -60,4 +61,9 @@ protected static function getDecaySeconds(): int
{
return static::$decaySeconds;
}

protected static function getRateLimitAmount(): int
{
return 1;
}
}

0 comments on commit a6f130c

Please sign in to comment.