fix timings

This commit is contained in:
2025-11-16 23:15:49 +10:00
parent 20f36d519a
commit 44f359ff9c

View File

@@ -27,6 +27,8 @@ class EmailSubscribe extends Component
public function subscribe(): void public function subscribe(): void
{ {
$this->validate();
// 1. Honeypot - if this hidden field is filled, treat as success but do nothing // 1. Honeypot - if this hidden field is filled, treat as success but do nothing
if (! empty($this->trap)) { if (! empty($this->trap)) {
$this->reset(['email', 'trap']); $this->reset(['email', 'trap']);
@@ -67,9 +69,6 @@ class EmailSubscribe extends Component
} }
session(['subscribe_attempts' => $attempts + 1]); session(['subscribe_attempts' => $attempts + 1]);
$this->validate();
// Look up existing subscription by email // Look up existing subscription by email
$subscription = EmailSubscriptions::where('email', $this->email)->first(); $subscription = EmailSubscriptions::where('email', $this->email)->first();