From 384866621c800cfb11ea926106542283a77328d4 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 10 Mar 2025 19:15:26 +0100 Subject: [PATCH] change(api): router to search with pagination schema --- ee/api/routers/subs/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/api/routers/subs/metrics.py b/ee/api/routers/subs/metrics.py index bbeeaadc1..39f1195c0 100644 --- a/ee/api/routers/subs/metrics.py +++ b/ee/api/routers/subs/metrics.py @@ -109,9 +109,9 @@ def create_card(projectId: int, data: schemas.CardSchema = Body(...), @app.post('/{projectId}/cards/search', tags=["cards"]) -def search_cards(projectId: int, data: schemas.SearchCardsSchema = Body(...), +def search_cards(projectId: int, data: schemas.MetricSearchSchema = Body(...), context: schemas.CurrentContext = Depends(OR_context)): - return {"data": custom_metrics.search_all(project_id=projectId, user_id=context.user_id, data=data)} + return {"data": custom_metrics.search_metrics(project_id=projectId, user_id=context.user_id, data=data)} @app.get('/{projectId}/cards/{metric_id}', tags=["cards"])