Upload 59 files
Browse files
app/api/routes/timeline.py
CHANGED
|
@@ -45,7 +45,7 @@ async def get_timeline(
|
|
| 45 |
Get timeline of recent entities and relationships.
|
| 46 |
Groups events by date.
|
| 47 |
"""
|
| 48 |
-
db = get_db()
|
| 49 |
|
| 50 |
# Calculate date range
|
| 51 |
end_date = datetime.now()
|
|
@@ -135,7 +135,7 @@ async def get_timeline(
|
|
| 135 |
@router.get("/stats")
|
| 136 |
async def get_timeline_stats():
|
| 137 |
"""Get statistics for timeline visualization"""
|
| 138 |
-
db = get_db()
|
| 139 |
|
| 140 |
# Count entities by type
|
| 141 |
entity_counts = {}
|
|
|
|
| 45 |
Get timeline of recent entities and relationships.
|
| 46 |
Groups events by date.
|
| 47 |
"""
|
| 48 |
+
db = next(get_db())
|
| 49 |
|
| 50 |
# Calculate date range
|
| 51 |
end_date = datetime.now()
|
|
|
|
| 135 |
@router.get("/stats")
|
| 136 |
async def get_timeline_stats():
|
| 137 |
"""Get statistics for timeline visualization"""
|
| 138 |
+
db = next(get_db())
|
| 139 |
|
| 140 |
# Count entities by type
|
| 141 |
entity_counts = {}
|