Update code in endpoints/france.post.py

This commit is contained in:
Backend IM Bot 2025-03-23 12:19:23 +01:00
parent 287fc45a0d
commit 983f42a891

View File

@ -12,7 +12,7 @@ states_in_france = [
"Hauts-de-France", "Hauts-de-France",
"Île-de-France", "Île-de-France",
"Normandie", "Normandie",
"Nouvelle-Aquitaine", "Nouvelle-Aquitaine",
"Occitanie", "Occitanie",
"Pays de la Loire", "Pays de la Loire",
"Provence-Alpes-Côte d'Azur" "Provence-Alpes-Côte d'Azur"
@ -20,10 +20,10 @@ states_in_france = [
@router.post("/france") @router.post("/france")
async def get_states_in_france(): async def get_states_in_france():
"""Returns list of states in France""" """endpoint that returns list of states in france"""
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",
"_verb": "post", "_verb": "post",