Update code in endpoints/open.post.py

This commit is contained in:
Backend IM Bot 2025-03-23 16:03:58 +01:00
parent 13b547dd1d
commit d8dae32ee6

View File

@ -15,11 +15,11 @@ towns_in_arizona = [
"Surprise" "Surprise"
] ]
@router.post("/open", summary="Returns list of towns in Arizona") @router.post("/open", status_code=200)
async def get_towns_in_arizona(): async def get_towns_in_arizona():
"""Returns list of towns in Arizona""" """Endpoint that returns list of towns in Arizona"""
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")
return { return {
"method": "POST", "method": "POST",