refactor(chalice): changed incident-events response
This commit is contained in:
parent
6f0deb57da
commit
c84aa417e1
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,6 @@ def get_incidents_by_session_id(session_id, project_id):
|
||||||
query = cur.format(query=""" \
|
query = cur.format(query=""" \
|
||||||
SELECT created_at,
|
SELECT created_at,
|
||||||
`$properties`,
|
`$properties`,
|
||||||
`properties`,
|
|
||||||
`$event_name` AS type
|
`$event_name` AS type
|
||||||
FROM product_analytics.events
|
FROM product_analytics.events
|
||||||
WHERE session_id = %(session_id)s
|
WHERE session_id = %(session_id)s
|
||||||
|
|
@ -92,6 +91,7 @@ def get_incidents_by_session_id(session_id, project_id):
|
||||||
ORDER BY created_at;""",
|
ORDER BY created_at;""",
|
||||||
parameters={"project_id": project_id, "session_id": session_id})
|
parameters={"project_id": project_id, "session_id": session_id})
|
||||||
rows = cur.execute(query)
|
rows = cur.execute(query)
|
||||||
|
rows = __explode_properties(rows)
|
||||||
rows = helper.list_to_camel_case(rows)
|
rows = helper.list_to_camel_case(rows)
|
||||||
rows = sorted(rows, key=lambda k: k["createdAt"])
|
rows = sorted(rows, key=lambda k: k["createdAt"])
|
||||||
return rows
|
return rows
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue