diff --git a/endpoints/open.post.py b/endpoints/open.post.py index cc89c2e..0f35041 100644 --- a/endpoints/open.post.py +++ b/endpoints/open.post.py @@ -2,7 +2,7 @@ from fastapi import APIRouter, HTTPException router = APIRouter() -towns = [ +towns_in_arizona = [ "Phoenix", "Tucson", "Mesa", @@ -15,14 +15,14 @@ towns = [ "Surprise" ] -@router.post("/open") -async def get_arizona_towns(): - """endpoint that returns list of town in arizona""" +@router.post("/open", summary="Returns list of towns in Arizona") +async def get_towns_in_arizona(): + """Returns list of towns in Arizona""" if request.method != "POST": - raise HTTPException(status_code=405, detail="Method Not Allowed") + raise HTTPException(status_code=405, detail="Method not allowed") return { "method": "POST", "_verb": "post", - "towns": towns + "towns": towns_in_arizona } \ No newline at end of file