REFACTOR ALL APIs
This commit is contained in:
10
services/external/app/main.py
vendored
10
services/external/app/main.py
vendored
@@ -10,8 +10,7 @@ from app.core.database import database_manager
|
||||
from app.services.messaging import setup_messaging, cleanup_messaging
|
||||
from shared.service_base import StandardFastAPIService
|
||||
# Include routers
|
||||
from app.api.weather import router as weather_router
|
||||
from app.api.traffic import router as traffic_router
|
||||
from app.api import weather_data, traffic_data, external_operations
|
||||
|
||||
|
||||
class ExternalService(StandardFastAPIService):
|
||||
@@ -125,7 +124,7 @@ class ExternalService(StandardFastAPIService):
|
||||
version="1.0.0",
|
||||
log_level=settings.LOG_LEVEL,
|
||||
cors_origins=settings.CORS_ORIGINS,
|
||||
api_prefix="/api/v1",
|
||||
api_prefix="", # Empty because RouteBuilder already includes /api/v1
|
||||
database_manager=database_manager,
|
||||
expected_tables=external_expected_tables,
|
||||
custom_health_checks={
|
||||
@@ -178,5 +177,6 @@ app = service.create_app()
|
||||
service.setup_standard_endpoints()
|
||||
|
||||
# Include routers
|
||||
service.add_router(weather_router, tags=["weather"])
|
||||
service.add_router(traffic_router, tags=["traffic"])
|
||||
service.add_router(weather_data.router)
|
||||
service.add_router(traffic_data.router)
|
||||
service.add_router(external_operations.router)
|
||||
Reference in New Issue
Block a user