satupeta-main/app/api/v1/routes/count_route.py
2026-02-23 12:20:42 +07:00

15 lines
418 B
Python
Executable File

from fastapi import APIRouter, Depends
from app.api.dependencies.factory import Factory
from app.schemas.count_schema import CountSchema
from app.services.count_service import CountService
router = APIRouter()
@router.get("/count", response_model=CountSchema)
async def get_counts(service: CountService = Depends(Factory().get_count_service)):
data = await service.get_counts()
return CountSchema(**data)