Dev (#3053)
* fix(chalice): support wrong payload for user-journey drill-down * fix(chalice): ignore event's MV for v1.22 refactor(DB): ignore event's MV for v1.22 * fix(chalice): fixed EE metrics
This commit is contained in:
parent
b91d979c98
commit
c07ad14ffc
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Union
|
||||
|
||||
import schemas
|
||||
from chalicelib.core.metrics import dashboards, custom_metrics
|
||||
from chalicelib.core.metrics import custom_metrics, dashboards
|
||||
from fastapi import Body, Depends
|
||||
from or_dependencies import OR_context, OR_scope
|
||||
from routers.base import get_routers
|
||||
|
|
@ -87,7 +87,7 @@ def try_card(projectId: int, data: schemas.CardSchema = Body(...),
|
|||
@app.post('/{projectId}/cards/try/sessions', tags=["cards"])
|
||||
def try_card_sessions(projectId: int, data: schemas.CardSessionsSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
data = custom_metrics.get_sessions(project_id=projectId, user_id=context.user_id, data=data)
|
||||
data = custom_metrics.get_sessions(project=context.project, user_id=context.user_id, data=data)
|
||||
return {"data": data}
|
||||
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ def get_card(projectId: int, metric_id: Union[int, str], context: schemas.Curren
|
|||
def get_card_sessions(projectId: int, metric_id: int,
|
||||
data: schemas.CardSessionsSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
data = custom_metrics.get_sessions_by_card_id(project_id=projectId, user_id=context.user_id, metric_id=metric_id,
|
||||
data = custom_metrics.get_sessions_by_card_id(project=context.project, user_id=context.user_id, metric_id=metric_id,
|
||||
data=data)
|
||||
if data is None:
|
||||
return {"errors": ["custom metric not found"]}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue