Skip to content

Commit

Permalink
Don't give out rewards for past days
Browse files Browse the repository at this point in the history
  • Loading branch information
riasvdv committed Nov 18, 2024
1 parent dbd0a0c commit ee83c0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Livewire/TopSecretComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public function submitAnswer(): void

Auth::user()->flag("bf-day-{$this->currentDay}");

// We don't want to give rewards for past days
if ($this->days[$this->currentDay]->endOfDay()->isPast()) {
return;
}

/**
* 20% discount on your next purchase on spatie.be
* 30% discount on merchandise on our Merch Store
Expand Down

0 comments on commit ee83c0a

Please sign in to comment.