From 0863c2af714e5966ec592100b7900821f840c206 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Wed, 19 Mar 2025 19:33:03 +0000 Subject: [PATCH] Update code in endpoints/Location.get.py --- endpoints/Location.get.py | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/endpoints/Location.get.py b/endpoints/Location.get.py index e69de29..e9b3063 100644 --- a/endpoints/Location.get.py +++ b/endpoints/Location.get.py @@ -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" + } + } \ No newline at end of file