You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
710 B
Python
27 lines
710 B
Python
from typing import List, Optional
|
|
from uuid import UUID
|
|
|
|
from fastapi import APIRouter, HTTPException, Query, status
|
|
|
|
from src.auth.service import CurrentUser
|
|
from src.database.core import DbSession
|
|
from src.database.service import CommonParameters
|
|
from src.models import StandardResponse
|
|
|
|
from .service import get_model_data
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("", response_model=StandardResponse[dict])
|
|
async def get_dashboard_model_data(
|
|
db_session: DbSession,
|
|
simulation_id: Optional[UUID] = Query(None),
|
|
):
|
|
result = await get_model_data(db_session=db_session, simulation_id=simulation_id)
|
|
|
|
return StandardResponse(
|
|
data=result,
|
|
message="Data retrieved successfully",
|
|
)
|