Update so that trace routes are reported as in phone apps.
This commit is contained in:
@ -282,7 +282,9 @@ app.get('/api/v1/nodes/:nodeId/traceroutes', async (req, res) => {
|
||||
}
|
||||
|
||||
// get latest traceroutes
|
||||
const traceroutes = await prisma.$queryRaw`SELECT * FROM traceroutes WHERE node_id = ${node.node_id} and JSON_LENGTH(route) > 0 and gateway_id is not null order by id desc limit ${count}`;
|
||||
// We want replies where want_response is false and it will be "to" the
|
||||
// requester.
|
||||
const traceroutes = await prisma.$queryRaw`SELECT * FROM traceroutes WHERE want_response = false and to_id = ${node.node_id} and gateway_id is not null order by id desc limit ${count}`;
|
||||
|
||||
res.json({
|
||||
traceroutes: traceroutes,
|
||||
|
Reference in New Issue
Block a user