Update so that trace routes are reported as in phone apps.
This commit is contained in:
parent
d52a055b05
commit
3c492f37aa
4 changed files with 30 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue