add temp captcha to contact form

This commit is contained in:
Blake Ridgway
2025-11-29 20:52:46 -06:00
parent c8df219f97
commit 59aeab43a9
4 changed files with 98 additions and 37 deletions

View File

@@ -422,7 +422,6 @@ func (h *Handler) handleContactSubmission(w http.ResponseWriter, r *http.Request
// If subscribe checkbox is checked, add to subscribers
if subscribe {
if err := h.db.AddSubscriber(r.Context(), email); err != nil {
// Log but don't fail the contact submission
h.logger.Printf(
" Subscriber %s already exists or failed to add: %v",
email,
@@ -463,7 +462,7 @@ func (h *Handler) handleContactSubmission(w http.ResponseWriter, r *http.Request
}
}
// Save contact message to database (optional - add to your DB interface)
// Save contact message to database
if err := h.db.AddContactMessage(r.Context(), name, email, subject, message); err != nil {
h.logger.Printf(
"⚠ Failed to save contact message: %v",