Providing /stats to give us basic reporting on number of nodes and packets seen by the tool

This commit is contained in:
Pablo Revilla
2025-01-17 12:47:55 -08:00
parent 4bcc7b08d0
commit 58e700db2b
+1
View File
@@ -14,6 +14,7 @@ from meshview import notify
# We count the total amount of packages
# This is to be used by /stats in web.py
async def get_total_packet_count():
async with database.async_session() as session:
q = select(func.count(Packet.id)) # Use SQLAlchemy's func to count packets