mirror of
https://github.com/furyhawk/agent_delta.git
synced 2026-07-21 02:05:36 +00:00
refactor: update api_router initialization to use APIRouter for improved route handling
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
"""API router aggregation."""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.api.routes.v1 import v1_router
|
||||
|
||||
# Direct alias — avoids FastAPI 0.135+ validation that rejects routes with
|
||||
# empty raw paths (e.g. @router.get("")) when include_router has no prefix.
|
||||
# The prefix (settings.API_V1_STR) is applied in main.py.
|
||||
api_router = v1_router
|
||||
api_router = APIRouter()
|
||||
|
||||
# API v1 routes (prefix is set in main.py via settings.API_V1_STR)
|
||||
api_router.include_router(v1_router)
|
||||
Reference in New Issue
Block a user