Cizz22 3 months ago
parent def04120d5
commit c671ad034c

@ -48,10 +48,10 @@ active_simulations = {}
@router.get("", response_model=StandardResponse[SimulationPagination])
async def get_all_simulation(db_session: DbSession, common: CommonParameters):
async def get_all_simulation(db_session: DbSession, common: CommonParameters, status: Optional(str) = Query(None)):
"""Get all simulation."""
results = await get_all(common)
results = await get_all(common, status)
return {
"data": results,

@ -37,7 +37,8 @@ active_simulations = {}
# Get Data Service
async def get_all(common: CommonParameters):
async def get_all(common: CommonParameters, status):
if status:
query = select(AerosSimulation).where(AerosSimulation.status == "completed")
results = await search_filter_sort_paginate(model=query, **common)

Loading…
Cancel
Save