Skip to content

Commit cff310a

Browse files
committed
Restructure gs/backend
1 parent c69d6bd commit cff310a

File tree

12 files changed

+31
-59
lines changed

12 files changed

+31
-59
lines changed

gs/backend/api/v1/endpoints/models/__init__.py renamed to gs/backend/__init__.py

File renamed without changes.

gs/backend/api/lifespan.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from collections.abc import AsyncGenerator
2+
from contextlib import asynccontextmanager
3+
4+
from fastapi import FastAPI
5+
6+
7+
@asynccontextmanager
8+
async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]:
9+
"""Lifecycle event for the FastAPI app."""
10+
yield
File renamed without changes.

gs/backend/api/v1/middleware/cors_middleware.py renamed to gs/backend/api/middleware/cors_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ def add_cors_middleware(app: FastAPI) -> None:
1414
allow_credentials=True,
1515
allow_methods=["*"],
1616
allow_headers=["*"],
17-
)
17+
)

gs/backend/api/setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from fastapi import FastAPI
2+
3+
from gs.backend.api.middleware.cors_middleware import add_cors_middleware
4+
5+
6+
def setup_routes(app: FastAPI) -> None:
7+
"""Adds the routes to the app"""
8+
9+
10+
def setup_middlewares(app: FastAPI) -> None:
11+
"""Adds the middlewares to the app"""
12+
add_cors_middleware(app)

gs/backend/api/v1/lifespan.py

Lines changed: 0 additions & 33 deletions
This file was deleted.
File renamed without changes.

gs/backend/api/v1/models/mcc/__init__.py

Whitespace-only changes.

gs/backend/api/v1/setup.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)