include PKI packages in portnum-counts

This commit is contained in:
Anton Roslund 2025-04-16 19:26:02 +02:00
parent 2fbaab81c5
commit fac5a91829

View file

@ -128,7 +128,10 @@ router.get('/portnum-counts', async (req, res) => {
created_at: { gte: startTime }, created_at: { gte: startTime },
...(Number.isInteger(nodeId) ? { from: nodeId } : {}), ...(Number.isInteger(nodeId) ? { from: nodeId } : {}),
packet_id: { not: null }, 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} select: {from: true, packet_id: true, portnum: true, channel_id: true}
}); });