Skip to content

Commit

Permalink
event triggered only once a day
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielpeixoto committed Jan 28, 2020
1 parent 33cb56d commit b80f353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/BlockBots.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function blocked($request, $dailyLimit)
if ($fake_mode) {
return false;
} else {
if (Auth::check()) {
if (Auth::check() && $number_of_hits == $dailyLimit + 1) {
event(new UserBlockedEvent(Auth::user(), $number_of_hits, Carbon::now()));
}
return true;
Expand Down

0 comments on commit b80f353

Please sign in to comment.