mirror of
https://github.com/Xevion/linkpulse.git
synced 2025-12-06 07:15:28 -06:00
Add __init__ module hints, TODO, rm unused import, fix router import, authentication router stub
This commit is contained in:
0
backend/linkpulse/__init__.py
Normal file
0
backend/linkpulse/__init__.py
Normal file
@@ -45,7 +45,7 @@ async def lifespan(_: FastAPI) -> AsyncIterator[None]:
|
|||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
|
|
||||||
from routers import authentication
|
from linkpulse.routers import authentication
|
||||||
|
|
||||||
app = FastAPI(lifespan=lifespan, default_response_class=ORJSONResponse)
|
app = FastAPI(lifespan=lifespan, default_response_class=ORJSONResponse)
|
||||||
app.include_router(authentication.router)
|
app.include_router(authentication.router)
|
||||||
@@ -74,6 +74,7 @@ app.add_middleware(CorrelationIdMiddleware)
|
|||||||
|
|
||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
async def health():
|
async def health():
|
||||||
|
# TODO: Check database connection
|
||||||
return "OK"
|
return "OK"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ This module defines the database models for the LinkPulse backend.
|
|||||||
It also provides a base model with database connection details.
|
It also provides a base model with database connection details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from os import getenv
|
from os import getenv
|
||||||
|
|
||||||
import structlog
|
import structlog
|
||||||
|
|||||||
0
backend/linkpulse/routers/__init__.py
Normal file
0
backend/linkpulse/routers/__init__.py
Normal file
6
backend/linkpulse/routers/authentication.py
Normal file
6
backend/linkpulse/routers/authentication.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from typing import Tuple, Optional
|
||||||
|
|
||||||
|
from fastapi import APIRouter
|
||||||
|
from linkpulse.models import User, Session
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
Reference in New Issue
Block a user