|
"""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 |
|
|
|
|
|
logger = logging.getLogger(__name__) |
|
|
|
|
|
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()) |
|
|