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>
A search failure was logged but execution continued, silently returning
'no emails' to the caller. This masked the most likely cause of the
polling not working. Error now propagates so the caller can log and
handle it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A failed file write was silently ignored, causing attendance updates
to be lost with no indication of failure to cron or the log.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Concurrent HTTP requests and the cron job could race on the file,
causing lost updates or torn writes. A package-level RWMutex now
guards all reads and writes.
Also URL-encodes player names in ToggleUrl to prevent query-parameter
injection from names containing '&' or '='.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
log.Fatal called os.Exit from a goroutine, bypassing deferred cleanup
and crashing the process on any transient fetch error. Errors now
propagate back to the caller via a buffered channel. Also adds a drain
defer so the goroutine can always exit if the consumer returns early.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bounce messages and MAILER-DAEMON notices can have no From address,
causing a panic on the bare [0] index access.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A missing .env file no longer causes a fatal error. Env vars can now
come from the container environment (Docker/systemd) or a .env file
interchangeably.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avoids collision with standard Linux shell variables that would cause
silent authentication failures against the IMAP server.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Route all log output to AWP_LOG_FILE (from .env) if set, else stderr
- Log errors explicitly before returning so they appear in the log file
- Replace log.Fatal in fetch.go with proper error return so callers control logging
- Remove chatty success/no-op log lines that would bloat cron log files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>