From fac5a918292d62793763d7fd1d1b37271fa9d464 Mon Sep 17 00:00:00 2001 From: Anton Roslund Date: Wed, 16 Apr 2025 19:26:02 +0200 Subject: [PATCH] include PKI packages in portnum-counts --- src/stats.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stats.js b/src/stats.js index 8d12e55..cab6dd1 100644 --- a/src/stats.js +++ b/src/stats.js @@ -128,7 +128,10 @@ router.get('/portnum-counts', async (req, res) => { created_at: { gte: startTime }, ...(Number.isInteger(nodeId) ? { from: nodeId } : {}), packet_id: { not: null }, - portnum: { not: 73 }, // Exclude portnum 73 (e.g. map reports) + OR: [ + { portnum: { not: 73 } }, // Exclude portnum 73 (e.g. map reports) + { portnum: null } // But include PKI packages, they have no portnum + ] }, select: {from: true, packet_id: true, portnum: true, channel_id: true} });