Added and fixed Create auction API endpoint. Added middleware, session-based authentication and logout endpoint

This commit is contained in:
2024-10-17 05:24:56 +00:00
parent fbbdad51c2
commit dca14861de
7 changed files with 358 additions and 42 deletions

View File

@ -1,7 +1,7 @@
from fastapi import FastAPI
from sqlalchemy.ext.asyncio import AsyncEngine
from contextlib import asynccontextmanager
from app.routers import auth # Assuming you have a router for auth logic
from app.routers import auth, auctions # Assuming you have a router for auth logic
from app.database import engine
from app.models import Base
@ -23,6 +23,7 @@ app = FastAPI(lifespan=lifespan)
# Register your API routes
app.include_router(auth.router)
app.include_router(auctions.router)
@app.get("/")
async def root():