Update code in endpoints/sport.get.py

This commit is contained in:
Backend IM Bot 2025-03-20 06:01:51 +00:00
parent 23bab3b668
commit eab48aebc5

View File

@ -0,0 +1,35 @@
from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_users_db
router = APIRouter()
@router.get("/sport")
async def get_sports():
"""Get list of English sports"""
sports = [
"Football",
"Cricket",
"Rugby Union",
"Rugby League",
"Tennis",
"Golf",
"Boxing",
"Athletics",
"Field Hockey",
"Netball",
"Squash",
"Badminton",
"Rowing",
"Cycling",
"Horse Racing"
]
return {
"message": "Sports list retrieved successfully",
"data": sports,
"metadata": {
"total_count": len(sports),
"category": "English sports",
"source": "demo_database"
}
}