Commit graph

12 commits

Author SHA1 Message Date
5f1a48b1be Log error when sendEmailHandler fails to send an email
Send Reminder failures were silently swallowed, only surfacing in the
HTTP response and never in the application log, unlike the GM
notification email flows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-04 21:33:09 -04:00
ee4581ed7e Send GM notification email asynchronously
Page response no longer waits on SMTP — status update persists and
returns immediately; email fires in a background goroutine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 20:41:24 -04:00
fc5c986141 Consolidate log file env vars: AWP_LOG_FILE (web) and AWP_CLI_LOG_FILE (CLI)
Removes the duplicate log setup from cli/cmd/root.go that was reading
AWP_LOG_FILE — log file config now lives only in each binary's main.go.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 19:57:46 -04:00
01d2cae282 Send GM status update email on every attendance change
When a player's attendance is updated — either via email (awp-cli check)
or via the web toggle — an email is sent to the GM with:
  - who changed, what they changed to, and how (email or the site)
  - a summary count of attending/not attending/no response
  - the full current player status list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 19:07:51 -04:00
bda5ef1fcf Fix PORT env var overwriting the 8080 fallback
The old code set port='8080' then unconditionally overwrote it with
os.Getenv("PORT"), which returns "" when unset, causing the server
to bind to ':' instead of ':8080'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 18:39:19 -04:00
d48adbc3f5 Add missing return after redirect in /login handler
Without the return, execution fell through to render the login page
into the same response after writing the redirect header.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 18:38:19 -04:00
dcf1230414 Handle GenerateJWTAndStoreInCookie error in setupHandler
A JWT signing failure was silently ignored, leaving the user on the
setup page with no auth cookie and no explanation for subsequent 401s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 18:35:18 -04:00
2d6436dca6 Add missing auth check to saveSetupHandler
Consistent with all other mutation handlers which already guard with
ValidateJWTFromCookie.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 18:23:27 -04:00
04f687a278 Fix build errors and upgrade templ to v0.3.1020
- Add missing bcc argument to NewEmail call in pkg/email/fetch.go
- Upgrade github.com/a-h/templ from v0.3.833 to v0.3.1020 to match generator
- Add player management routes (add/delete/edit) and playershandler
- Update templates and loaddata with pending changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 20:05:53 -04:00
4a778b1dc0 Add uncommitted changes before migration 2025-12-21 12:25:17 -05:00
a36ef9d8f6 Fixing templates 2024-04-28 15:11:16 -04:00
9f894671b0 Full app, v1.0. Contains web app and cli. 2024-01-20 21:45:53 -05:00