from typing import Annotated, Any from anydi import Provide from fastapi import APIRouter, Depends from email_campaigns.api import auth, schemas from email_campaigns.fonts.handlers import GetGoogleFontsHandler, GetGoogleFontsRequest router = APIRouter(tags=["Fonts"]) @router.get( "/fonts/google", operation_id="getGoogleFonts", response_model=list[schemas.GoogleFont], response_model_by_alias=True, ) def get_google_fonts( identity_id: Annotated[str, Depends(auth.get_identity_id)], handler: Provide[GetGoogleFontsHandler], search: str | None = None, limit: int = 100, ) -> Any: return handler.handle( GetGoogleFontsRequest(identity_id=identity_id, search=search, limit=limit) )