From 3abdabdd09c1a408f71c918bf1662f171cd18b33 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sat, 23 Mar 2024 23:24:56 +1300 Subject: [PATCH] no need for 4k queries on each load now that data is stored on node itself --- src/index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index 05b89b0..a5c1c56 100644 --- a/src/index.js +++ b/src/index.js @@ -61,14 +61,7 @@ app.get('/api/v1/nodes', async (req, res) => { node_id_hex: "!" + node.node_id.toString(16), hardware_model_name: HardwareModel.valuesById[node.hardware_model] ?? "UNKNOWN", role_name: Role.valuesById[node.role] ?? "UNKNOWN", - neighbour_info: await prisma.neighbourInfo.findFirst({ - where: { - node_id: node.node_id, - }, - orderBy: { - id: 'desc', - }, - }), + neighbour_info: node.neighbours, // todo: remove once ui uses new neighbours key }) }