feat: backend core — models, auth, CRUD, tests
This commit is contained in:
+9
-1
@@ -1,11 +1,14 @@
|
||||
from contextlib import asynccontextmanager
|
||||
from collections.abc import AsyncIterator
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from app.auth.router import router as auth_router
|
||||
from app.config import settings
|
||||
from app.database import engine
|
||||
from app.routers.categories import router as categories_router
|
||||
from app.routers.transactions import router as transactions_router
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@@ -33,6 +36,11 @@ def create_app() -> FastAPI:
|
||||
async def health_check() -> dict[str, str]:
|
||||
return {"status": "ok"}
|
||||
|
||||
api_prefix = "/api/v1"
|
||||
app.include_router(auth_router, prefix=api_prefix)
|
||||
app.include_router(transactions_router, prefix=api_prefix)
|
||||
app.include_router(categories_router, prefix=api_prefix)
|
||||
|
||||
return app
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user