Initial commit

Made-with: Cursor
This commit is contained in:
Dusan Vojacek
2026-03-20 13:27:37 +01:00
commit 8b4af663d8
77 changed files with 13337 additions and 0 deletions

19
backend/app/deps.py Normal file
View File

@@ -0,0 +1,19 @@
"""Sdílené FastAPI závislosti (DB pool)."""
from __future__ import annotations
import asyncpg
from fastapi import HTTPException
_pg_pool: asyncpg.Pool | None = None
def set_pg_pool(pool: asyncpg.Pool | None) -> None:
global _pg_pool
_pg_pool = pool
async def get_pg_pool() -> asyncpg.Pool:
if _pg_pool is None:
raise HTTPException(status_code=503, detail="Database pool not ready")
return _pg_pool