Jarian Cottingham 5c283eceef chore: remove test artifacts, fix hardcoded paths, ruff clean, license
- Remove committed .coverage and test-results/ (196K screenshots); gitignore them
- Fix hardcoded  /home/userpath + venv/bin/python in test_endpoints.py
  (relative backend dir + sys.executable)
- Fix concatenated 'import json' in settings.py; bare excepts -> Exception;
  SQLAlchemy-safe is_active.is_(True); __all__ on models/schemas barrels
- ruff clean (93 fixes), MIT LICENSE, PLAN.md -> docs/, README Tests section
- 300 tests pass, 93.7% coverage
2026-08-20 21:34:15 +00:00

22 lines
1.1 KiB
Python

from fastapi import APIRouter
from typing import List, Optional
from ..schemas.events import ConcertEventResponse
router = APIRouter(prefix="/api/events", tags=["events"])
PLACEHOLDER_EVENTS = [
{"id": "1", "name": "Summer Music Festival", "venue": "Central Park", "location_lat": 40.7829, "location_lon": -73.9654, "date": "2025-07-15", "description": "A day of live music", "image_url": None},
{"id": "2", "name": "Jazz Night", "venue": "Blue Note", "location_lat": 40.7310, "location_lon": -74.0020, "date": "2025-06-20", "description": "Live jazz performance", "image_url": None},
{"id": "3", "name": "Electronic Beats", "venue": "Warehouse District", "location_lat": 40.7580, "location_lon": -73.9855, "date": "2025-08-10", "description": "Electronic music showcase", "image_url": None},
]
@router.get("", response_model=List[ConcertEventResponse])
def list_events(lat: Optional[float] = None, lon: Optional[float] = None):
return PLACEHOLDER_EVENTS
@router.post("", response_model=ConcertEventResponse)
def add_event(event: ConcertEventResponse):
PLACEHOLDER_EVENTS.append(event.model_dump())
return event