Update code in endpoints/sport.get.py
This commit is contained in:
parent
23bab3b668
commit
eab48aebc5
@ -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"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user