feat: add admin endpoint to view all events across wallets
Some checks failed
lint.yml / feat: add admin endpoint to view all events across wallets (pull_request) Failing after 0s
Some checks failed
lint.yml / feat: add admin endpoint to view all events across wallets (pull_request) Failing after 0s
- GET /api/v1/events/all — returns all events regardless of wallet (admin key) - Admin UI tries /events/all first, falls back to own wallet events - Approved events from other users now visible in admin events table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b467826622
commit
7843da21d8
2 changed files with 30 additions and 2 deletions
11
views_api.py
11
views_api.py
|
|
@ -63,6 +63,17 @@ async def api_events_public():
|
|||
return [event.dict() for event in events]
|
||||
|
||||
|
||||
@events_api_router.get("/api/v1/events/all")
|
||||
async def api_events_all(
|
||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
||||
):
|
||||
"""Get all events across all wallets. Admin only."""
|
||||
from .crud import get_all_events
|
||||
|
||||
events = await get_all_events()
|
||||
return [event.dict() for event in events]
|
||||
|
||||
|
||||
@events_api_router.post("/api/v1/events")
|
||||
@events_api_router.put("/api/v1/events/{event_id}")
|
||||
async def api_event_create(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue