refactor: SELECT only the name column
This commit is contained in:
parent
7638e277ca
commit
eae24505f7
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ function getMachineNames (config) {
|
||||||
* @returns {string} machine name
|
* @returns {string} machine name
|
||||||
*/
|
*/
|
||||||
function getMachineName (machineId) {
|
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])
|
return db.oneOrNone(sql, [machineId])
|
||||||
.then(it => it.name)
|
.then(it => it.name)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue