From eae24505f762e69b94cdd0f6cd78684e49627be0 Mon Sep 17 00:00:00 2001 From: siiky Date: Thu, 18 Jul 2024 17:22:47 +0100 Subject: [PATCH] refactor: `SELECT` only the `name` column --- lib/machine-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/machine-loader.js b/lib/machine-loader.js index fd9375b1..68a3612a 100644 --- a/lib/machine-loader.js +++ b/lib/machine-loader.js @@ -148,7 +148,7 @@ function getMachineNames (config) { * @returns {string} machine name */ function getMachineName (machineId) { - const sql = 'SELECT * FROM devices WHERE device_id=$1' + const sql = 'SELECT name FROM devices WHERE device_id=$1' return db.oneOrNone(sql, [machineId]) .then(it => it.name) }