PIbd-32_Kashin_M.I_API_Cour.../router_statistics.py

17 lines
289 B
Python

from fastapi import APIRouter
from repository import QuestionRepository
router = APIRouter(
prefix="/statistics",
tags=["Statistics"],
)
@router.get("/")
async def get_class_statistics():
statistics = await QuestionRepository.get_class_statistics()
return statistics