Add Skins format, GolfCourseAPI import, and UX improvements
- Add Skins game format with optional carryover, mirroring BBB scoring pattern
- Add GolfCourseAPI integration for course search and import (httpx)
- Unwrap {"course": {}} API response envelope on import
- Add searchable course combobox and player filter to new game form
- Redirect to summary page after finishing a game
- Fix auth to allow registered users without a pending invitation
- Fix hardcoded BBB format in create_game; store carryover flag in DB
- Add game summary/scorecard view for completed games
- Add live games social stream to dashboard
- Add course name + subtitle to recent game cards
- Reorder nav: Home → Games → Admin → Profile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-10
@@ -32,17 +32,20 @@ async def login_submit(
|
||||
):
|
||||
email = email.strip().lower()
|
||||
|
||||
# Check email is admin or invited
|
||||
# Check email is admin, already registered, or has a pending invitation
|
||||
if email != ADMIN_EMAIL:
|
||||
async with db.execute(
|
||||
"SELECT id FROM invitations WHERE email = ?", (email,)
|
||||
) as cursor:
|
||||
invitation = await cursor.fetchone()
|
||||
if invitation is None:
|
||||
return templates.TemplateResponse(
|
||||
"auth/login.html",
|
||||
{"request": request, "error": "This email address has not been invited."},
|
||||
)
|
||||
async with db.execute("SELECT id FROM users WHERE email = ?", (email,)) as cursor:
|
||||
existing_user = await cursor.fetchone()
|
||||
if existing_user is None:
|
||||
async with db.execute(
|
||||
"SELECT id FROM invitations WHERE email = ?", (email,)
|
||||
) as cursor:
|
||||
invitation = await cursor.fetchone()
|
||||
if invitation is None:
|
||||
return templates.TemplateResponse(
|
||||
"auth/login.html",
|
||||
{"request": request, "error": "This email address has not been invited."},
|
||||
)
|
||||
|
||||
await create_magic_token(email, db)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user