github-actions[bot]
Automated Deploy: 0d5b759d8eca219a25b3ab717925e73a66bbf4a4
2756f0f
Raw History Blame Contribute Delete
543 Bytes
"""D6: GET /v1/catalog/metrics?mode=h|p."""
from typing import Annotated, Literal
from fastapi import APIRouter, Query
from app.core.dependencies import CurrentAccount
from app.modules.catalog.schemas import CatalogOut
from app.modules.catalog.service import CatalogService
router = APIRouter(prefix="/v1", tags=["catalog"])
@router.get("/catalog/metrics", response_model=CatalogOut)
async def catalog_metrics(_: CurrentAccount, mode: Annotated[Literal["h", "p"], Query()] = "h") -> CatalogOut:
return CatalogService().metrics(mode)