velmurugan1122 commited on
Commit
c2815ab
·
1 Parent(s): 29b07b1

fix : changes

Browse files
Files changed (1) hide show
  1. routes/population_routes.py +5 -0
routes/population_routes.py CHANGED
@@ -20,6 +20,11 @@ def get_continent_countries(continent_name: str):
20
  raise HTTPException(status_code=404, detail=f"Continent '{continent_name}' not found.")
21
  return filtered_countries
22
 
 
 
 
 
 
23
  @router.get("/continent/{continent_name}", response_model=ContinentPopulationStats)
24
  def get_continent_population_data(continent_name: str):
25
  try:
 
20
  raise HTTPException(status_code=404, detail=f"Continent '{continent_name}' not found.")
21
  return filtered_countries
22
 
23
+ @router.get("/")
24
+ def home():
25
+ return {"message": "Welcome to the World Population API! Use /continent/{continent_name} to get population statistics."}
26
+
27
+
28
  @router.get("/continent/{continent_name}", response_model=ContinentPopulationStats)
29
  def get_continent_population_data(continent_name: str):
30
  try: