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