Update code in endpoints/states.get.py
This commit is contained in:
parent
48348d7966
commit
3cd238145b
51
endpoints/states.get.py
Normal file
51
endpoints/states.get.py
Normal 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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user