Update code in endpoints/open.post.py
This commit is contained in:
parent
0e16f7bbb9
commit
e637ef2b0b
@ -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")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user