feat: Update endpoint countries
This commit is contained in:
parent
168609837b
commit
8a985d333c
@ -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]
|
Loading…
x
Reference in New Issue
Block a user