feat: Update endpoint countries

This commit is contained in:
Backend IM Bot 2025-03-11 18:31:51 +00:00
parent 168609837b
commit 8a985d333c

View File

@ -0,0 +1,7 @@
@router.get("/countries", response_model=List[CountryResponse])
async def get_countries(db: Session = Depends(get_db)):
"""
Fetch the list of countries from the database.
"""
countries = db.query(Country).all()
return [CountryResponse.from_orm(country) for country in countries]