Fix stale DB connections, add Why Bourbonacci section, harden auth

- Add pool_pre_ping and pool_recycle to prevent lost connection errors on idle pool
- Add Why Bourbonacci card to about page
- Redirect to login on 401 in API layer
- Check JWT expiry in isLoggedIn instead of just token presence

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
derekcandClaude Sonnet 4.6 committed 2026-05-09 21:37:04 -07:00
1 parent a9de081a8a
commit 866c2e0bed
4 files changed
+26 -2

No files matched your search

+7
View File
@@ -26,6 +26,13 @@ const API = (() => {
const data = await res.json().catch(() => null);
if (res.status === 401) {
localStorage.removeItem('bb_token');
localStorage.removeItem('bb_user');
window.location.href = '/login.html';
return;
}
if (!res.ok) {
const msg = data?.detail || `HTTP ${res.status}`;
throw new Error(Array.isArray(msg) ? msg.map(e => e.msg).join(', ') : msg);