feat: add user_id ticket support and public events endpoint
Some checks failed
lint / lint (push) Has been cancelled
Some checks failed
lint / lint (push) Has been cancelled
- Tickets can be created with user_id instead of name/email
- name/email default to empty string in DB (not NULL-safe)
- New endpoints: GET /api/v1/events/public, GET /api/v1/tickets/user/{user_id}
- POST /api/v1/tickets/{event_id} accepts user_id in body
- Migration m007 adds user_id column to tickets table
- CreateTicket validates: either user_id or (name + email) required
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f06bd9a668
commit
2740d73678
4 changed files with 105 additions and 9 deletions
|
|
@ -175,3 +175,11 @@ async def m006_add_extra_fields(db):
|
|||
|
||||
# Add 'extra' column to ticket table
|
||||
await db.execute("ALTER TABLE events.ticket ADD COLUMN extra TEXT;")
|
||||
|
||||
|
||||
async def m007_add_user_id(db):
|
||||
"""
|
||||
Add user_id column to tickets table.
|
||||
Allows ticket purchase via LNbits user-id without name/email.
|
||||
"""
|
||||
await db.execute("ALTER TABLE events.ticket ADD COLUMN user_id TEXT;")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue