From 290c1fc85c7a70670b51308d7429de2201b35ee2 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 9 Nov 2024 14:01:54 -0600 Subject: [PATCH] Add __init__ module hints, TODO, rm unused import, fix router import, authentication router stub --- backend/linkpulse/__init__.py | 0 backend/linkpulse/app.py | 3 ++- backend/linkpulse/models.py | 1 - backend/linkpulse/routers/__init__.py | 0 backend/linkpulse/routers/authentication.py | 6 ++++++ 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 backend/linkpulse/__init__.py create mode 100644 backend/linkpulse/routers/__init__.py create mode 100644 backend/linkpulse/routers/authentication.py diff --git a/backend/linkpulse/__init__.py b/backend/linkpulse/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/linkpulse/app.py b/backend/linkpulse/app.py index 533f831..76b3d3d 100644 --- a/backend/linkpulse/app.py +++ b/backend/linkpulse/app.py @@ -45,7 +45,7 @@ async def lifespan(_: FastAPI) -> AsyncIterator[None]: db.close() -from routers import authentication +from linkpulse.routers import authentication app = FastAPI(lifespan=lifespan, default_response_class=ORJSONResponse) app.include_router(authentication.router) @@ -74,6 +74,7 @@ app.add_middleware(CorrelationIdMiddleware) @app.get("/health") async def health(): + # TODO: Check database connection return "OK" diff --git a/backend/linkpulse/models.py b/backend/linkpulse/models.py index 26365e4..fb37492 100644 --- a/backend/linkpulse/models.py +++ b/backend/linkpulse/models.py @@ -3,7 +3,6 @@ This module defines the database models for the LinkPulse backend. It also provides a base model with database connection details. """ -from datetime import datetime from os import getenv import structlog diff --git a/backend/linkpulse/routers/__init__.py b/backend/linkpulse/routers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/linkpulse/routers/authentication.py b/backend/linkpulse/routers/authentication.py new file mode 100644 index 0000000..f0597cd --- /dev/null +++ b/backend/linkpulse/routers/authentication.py @@ -0,0 +1,6 @@ +from typing import Tuple, Optional + +from fastapi import APIRouter +from linkpulse.models import User, Session + +router = APIRouter()