feat(api): custom metrics changed try sessions payload schema
This commit is contained in:
parent
856910e9b1
commit
ee97b9b086
2 changed files with 2 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ def get_sessions(project_id, user_id, metric_id, data: schemas.CustomMetricSessi
|
|||
return results
|
||||
|
||||
|
||||
def try_sessions(project_id, user_id, data: schemas.TryCustomMetricsPayloadSchema):
|
||||
def try_sessions(project_id, user_id, data: schemas.CustomMetricSessionsPayloadSchema):
|
||||
results = []
|
||||
for s in data.series:
|
||||
s.filter.startDate = data.startTimestamp
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ def try_custom_metric(projectId: int, data: schemas.TryCustomMetricsPayloadSchem
|
|||
@app.post('/{projectId}/metrics/try/sessions', tags=["dashboard"])
|
||||
@app.post('/{projectId}/custom_metrics/try/sessions', tags=["customMetrics"])
|
||||
def try_custom_metric_sessions(projectId: int,
|
||||
data: schemas.TryCustomMetricsPayloadSchema = Body(...),
|
||||
data: schemas.CustomMetricSessionsPayloadSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
data = custom_metrics.try_sessions(project_id=projectId, user_id=context.user_id, data=data)
|
||||
return {"data": data}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue