"""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)