Update code in endpoints/Location.get.py

This commit is contained in:
Backend IM Bot 2025-03-19 19:33:03 +00:00
parent 13c67f3557
commit 0863c2af71

View File

@ -0,0 +1,47 @@
from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_users_db
router = APIRouter()
@router.get("/Location")
async def location_handler():
"""Demo location endpoint"""
# Demo location data
locations = {
"headquarters": {
"city": "San Francisco",
"country": "USA",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"offices": [
{
"city": "New York",
"country": "USA",
"coordinates": {
"latitude": 40.7128,
"longitude": -74.0060
}
},
{
"city": "London",
"country": "UK",
"coordinates": {
"latitude": 51.5074,
"longitude": -0.1278
}
}
]
}
return {
"message": "Location data retrieved successfully",
"data": locations,
"metadata": {
"total_offices": len(locations["offices"]) + 1,
"last_updated": "2024-01-01"
}
}