Subham9126 commited on
Commit
66cde78
·
verified ·
1 Parent(s): 0a48acb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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", example="India")
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 # Limit to 100 if no search
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"])