add API code for /api/packets

This commit is contained in:
Pablo Revilla
2025-08-07 16:06:24 -07:00
parent 9065616347
commit d405524ff5
+2 -2
View File
@@ -1100,9 +1100,9 @@ async def api_packets(request):
async def net(request):
try:
# Fetch packets for the given node ID and port number
after_time = datetime.datetime.now() - timedelta(days=3)
after_time = datetime.datetime.now() - timedelta(days=6)
packets = await store.get_packets(
portnum=PortNum.TEXT_MESSAGE_APP, after=after_time, limit=1000)
portnum=PortNum.TEXT_MESSAGE_APP, after=after_time)
# Convert packets to UI packets
ui_packets = [Packet.from_model(p) for p in packets]