Files
SigHej/backend/app/api/stats.py
Henrik Jess Nielsen 99e9b509a0
Some checks failed
Backend CI / test (push) Has been cancelled
Flutter CI / analyze-and-test (push) Has been cancelled
eksplicit mapping af envs
2026-05-12 18:21:25 +02:00

15 lines
443 B
Python

from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.database import get_db
from app.models.stats import StatsResponse
from app.services import stats_service
router = APIRouter(tags=["stats"])
@router.get("", response_model=StatsResponse)
async def get_stats(db: AsyncSession = Depends(get_db)) -> StatsResponse:
data = await stats_service.get_stats(db)
return StatsResponse(**data)