OxbridgeEconomics
Update entity.py
7e15dd1 unverified
raw
history blame contribute delete
631 Bytes
"""This module defines the /lda route for the FastAPI application."""
import logging
from fastapi import APIRouter
from fastapi.responses import JSONResponse
from controllers.entity import retrieve_hot_entity # pylint: disable=import-error
# Configure logger
logger = logging.getLogger(__name__)
# Create FastAPI Router
router = APIRouter(prefix="/entity", tags=["entity"])
@router.get('/hot')
async def get_hot_entity():
"""
Handles GET requests to retrieve hot entity.
Returns:
dict: JSON response containing count and a list of hot entity.
"""
return JSONResponse(content=retrieve_hot_entity())