Update code in endpoints/states.get.py

This commit is contained in:
Backend IM Bot 2025-03-20 20:24:49 +01:00
parent 48348d7966
commit 3cd238145b

51
endpoints/states.get.py Normal file
View File

@ -0,0 +1,51 @@
from fastapi import APIRouter, Depends, HTTPException
router = APIRouter()
states = [
"Abia",
"Adamawa",
"Akwa Ibom",
"Anambra",
"Bauchi",
"Bayelsa",
"Benue",
"Borno",
"Cross River",
"Delta",
"Ebonyi",
"Edo",
"Ekiti",
"Enugu",
"Gombe",
"Imo",
"Jigawa",
"Kaduna",
"Kano",
"Katsina",
"Kebbi",
"Kogi",
"Kwara",
"Lagos",
"Nasarawa",
"Niger",
"Ogun",
"Ondo",
"Osun",
"Oyo",
"Plateau",
"Rivers",
"Sokoto",
"Taraba",
"Yobe",
"Zamfara",
"FCT"
]
@router.get("/states")
async def get_states():
"""Get list of states in Nigeria"""
return {
"message": "Success",
"data": states
}