fix(chalice): fixed async public api
This commit is contained in:
parent
d46a33e148
commit
5636fe1f56
1 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue