diff --git a/app/main.py b/app/main.py index 5650464..49500ff 100644 --- a/app/main.py +++ b/app/main.py @@ -1,12 +1,12 @@ from fastapi import FastAPI from fastapi.responses import RedirectResponse -from app.v1.routers import router as v1_router +from app.v1.routers import base_router as v1_router app = FastAPI() -app.include_router(v1_router) +app.include_router(v1_router.router) @app.get("/up") diff --git a/app/v1/routers/__init__.py b/app/v1/routers/__init__.py index ad4ee1d..e69de29 100644 --- a/app/v1/routers/__init__.py +++ b/app/v1/routers/__init__.py @@ -1,3 +0,0 @@ -__all__ = ["router"] - -from app.v1.routers.base import router diff --git a/app/v1/routers/base.py b/app/v1/routers/base.py deleted file mode 100644 index 13a73c1..0000000 --- a/app/v1/routers/base.py +++ /dev/null @@ -1,7 +0,0 @@ -from fastapi import APIRouter - -from app.v1.routers.users import router as users_router - - -router = APIRouter(prefix="/v1") -router.include_router(users_router, prefix="/users", tags=["Users"]) diff --git a/app/v1/routers/base_router.py b/app/v1/routers/base_router.py new file mode 100644 index 0000000..9af9231 --- /dev/null +++ b/app/v1/routers/base_router.py @@ -0,0 +1,7 @@ +from fastapi import APIRouter + +from app.v1.routers.users import users_router + + +router = APIRouter(prefix="/v1") +router.include_router(users_router.router, prefix="/users", tags=["Users"]) diff --git a/app/v1/routers/users/__init__.py b/app/v1/routers/users/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/v1/routers/users.py b/app/v1/routers/users/users_router.py similarity index 100% rename from app/v1/routers/users.py rename to app/v1/routers/users/users_router.py