feat: Update endpoint countries
This commit is contained in:
parent
0af36d03e3
commit
a5cd381890
@ -0,0 +1,31 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from core.database import fake_users_db
|
||||
from typing import List
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.post("/api/v1/endpoint")
|
||||
async def get_african_countries():
|
||||
"""Return list of all countries in Africa"""
|
||||
|
||||
african_countries = [
|
||||
"Algeria", "Angola", "Benin", "Botswana", "Burkina Faso", "Burundi",
|
||||
"Cameroon", "Cape Verde", "Central African Republic", "Chad", "Comoros",
|
||||
"Congo", "Democratic Republic of the Congo", "Djibouti", "Egypt",
|
||||
"Equatorial Guinea", "Eritrea", "Ethiopia", "Gabon", "Gambia", "Ghana",
|
||||
"Guinea", "Guinea-Bissau", "Ivory Coast", "Kenya", "Lesotho", "Liberia",
|
||||
"Libya", "Madagascar", "Malawi", "Mali", "Mauritania", "Mauritius",
|
||||
"Morocco", "Mozambique", "Namibia", "Niger", "Nigeria", "Rwanda",
|
||||
"Sao Tome and Principe", "Senegal", "Seychelles", "Sierra Leone",
|
||||
"Somalia", "South Africa", "South Sudan", "Sudan", "Swaziland",
|
||||
"Tanzania", "Togo", "Tunisia", "Uganda", "Zambia", "Zimbabwe"
|
||||
]
|
||||
|
||||
return {
|
||||
"message": "African countries retrieved successfully",
|
||||
"data": african_countries,
|
||||
"metadata": {
|
||||
"total_countries": len(african_countries),
|
||||
"continent": "Africa"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user