From 5636fe1f56c2c31b9c5b0b4c760c8b0420572e40 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 25 Jul 2023 14:30:54 +0200 Subject: [PATCH] fix(chalice): fixed async public api --- ee/api/routers/subs/v1_api_ee.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ee/api/routers/subs/v1_api_ee.py b/ee/api/routers/subs/v1_api_ee.py index a4706ff5a..25fe7a023 100644 --- a/ee/api/routers/subs/v1_api_ee.py +++ b/ee/api/routers/subs/v1_api_ee.py @@ -19,17 +19,17 @@ def get_assist_credentials(): @app_apikey.get('/v1/{projectKey}/assist/sessions', tags=["api"]) -def get_sessions_live(projectKey: str, userId: str = None, context: schemas.CurrentContext = Depends(OR_context)): +async def get_sessions_live(projectKey: str, userId: str = None, context: schemas.CurrentContext = Depends(OR_context)): projectId = projects.get_internal_project_id(projectKey) if projectId is None: return {"errors": ["invalid projectKey"]} - return core.get_sessions_live(projectId=projectId, userId=userId, context=context) + return await core.get_sessions_live(projectId=projectId, userId=userId, context=context) @app_apikey.post('/v1/{projectKey}/assist/sessions', tags=["api"]) -def sessions_live(projectKey: str, data: schemas.LiveSessionsSearchPayloadSchema = Body(...), - context: schemas.CurrentContext = Depends(OR_context)): +async def sessions_live(projectKey: str, data: schemas.LiveSessionsSearchPayloadSchema = Body(...), + context: schemas.CurrentContext = Depends(OR_context)): projectId = projects.get_internal_project_id(projectKey) if projectId is None: return {"errors": ["invalid projectKey"]} - return core.sessions_live(projectId=projectId, data=data, context=context) + return await core.sessions_live(projectId=projectId, data=data, context=context)