feat: add /bookshelf route and update redirects

- Add /bookshelf route as default page for logged-in users
- Update login and register handlers to redirect to /bookshelf
- Update homepage to auto-redirect to /bookshelf when logged in
- Preserve /dashboard route for backward compatibility
- Update test redirects to use /bookshelf

Changes:
- main.go: Add /bookshelf protected route
- auth.go: Change login/register redirects from /api/dashboard to /bookshelf (2 locations)
- edge_cases_test.go: Update test redirect to /bookshelf
- Maintains backward compatibility with existing /dashboard route

This makes the beautiful bookshelf the default landing page
for all authenticated users while keeping the old dashboard accessible.
This commit is contained in:
2026-01-29 15:52:11 -05:00
parent a0f0156d31
commit d9ca3d5a65
3 changed files with 26 additions and 4 deletions
+1 -1
View File
@@ -465,7 +465,7 @@ func TestHTMXRequests(t *testing.T) {
w.Write([]byte(`<div class="text-green-500">Registration successful! Redirecting...</div>
<script>
localStorage.setItem('token', 'fake-token');
window.location.href = '/api/dashboard';
window.location.href = '/bookshelf';
</script>`))
} else {
json.NewEncoder(w).Encode(map[string]interface{}{