feat: add admin-toggleable auto-approve setting
Some checks failed
lint.yml / feat: add admin-toggleable auto-approve setting (pull_request) Failing after 0s

- Extension settings table with auto_approve boolean
- GET/PUT /api/v1/settings endpoints (LNbits admin only)
- Settings card in admin UI with toggle
- When auto_approve is enabled, non-admin events skip approval

Closes aiolabs/events#11

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-04-27 17:59:59 +02:00
commit d69ec7dda2
6 changed files with 116 additions and 4 deletions

View file

@ -84,6 +84,12 @@ class Event(BaseModel):
nostr_event_created_at: int | None = None
class EventsSettings(BaseModel):
"""Extension-level settings for the events extension."""
auto_approve: bool = False # Skip approval for all users
class TicketExtra(BaseModel):
applied_promo_code: str | None = None
sats_paid: int | None = None