Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,7 +131,7 @@ async def get_datetime_by_path(country_name: str):
|
|
| 131 |
tags=["DateTime"]
|
| 132 |
)
|
| 133 |
async def get_datetime_by_query(
|
| 134 |
-
country: str = Query(..., description="Name of the country",
|
| 135 |
):
|
| 136 |
"""
|
| 137 |
Get current date and time for a country using query parameter.
|
|
@@ -173,7 +173,7 @@ async def list_countries(
|
|
| 173 |
|
| 174 |
return {
|
| 175 |
"total": len(countries),
|
| 176 |
-
"countries": countries[:100] if not search else countries
|
| 177 |
}
|
| 178 |
|
| 179 |
@app.get("/health", tags=["Info"])
|
|
|
|
| 131 |
tags=["DateTime"]
|
| 132 |
)
|
| 133 |
async def get_datetime_by_query(
|
| 134 |
+
country: str = Query(..., description="Name of the country", examples=["India", "United States"])
|
| 135 |
):
|
| 136 |
"""
|
| 137 |
Get current date and time for a country using query parameter.
|
|
|
|
| 173 |
|
| 174 |
return {
|
| 175 |
"total": len(countries),
|
| 176 |
+
"countries": countries[:100] if not search else countries
|
| 177 |
}
|
| 178 |
|
| 179 |
@app.get("/health", tags=["Info"])
|