Update code in endpoints/open.post.py

This commit is contained in:
Backend IM Bot 2025-03-23 16:47:21 +01:00
parent 0e16f7bbb9
commit e637ef2b0b

View File

@ -3,20 +3,20 @@ from fastapi import APIRouter, HTTPException
router = APIRouter() router = APIRouter()
towns = [ towns = [
"Yaounde",
"Douala", "Douala",
"Yaoundé",
"Garoua",
"Bafoussam", "Bafoussam",
"Bamenda", "Garoua",
"Maroua", "Maroua",
"Ngaoundéré", "Bamenda",
"Kumba", "Ngaoundere",
"Nkongsamba", "Bertoua",
"Bertoua" "Ebolowa",
"Kribi"
] ]
@router.post("/open") @router.post("/open")
async def get_towns(): async def get_cameroon_towns():
"""endpoint that returns list of town in camerouns""" """endpoint that returns list of town in camerouns"""
if request.method != "POST": if request.method != "POST":
raise HTTPException(status_code=405, detail="Method Not Allowed") raise HTTPException(status_code=405, detail="Method Not Allowed")