refactor: move pairing.js:isPaired() to machine-loader.js:getPairedMachineName()
This commit is contained in:
parent
22b6b64fe4
commit
49080b0412
3 changed files with 11 additions and 13 deletions
|
|
@ -81,13 +81,4 @@ function authorizeCaDownload(caToken) {
|
|||
})
|
||||
}
|
||||
|
||||
function isPaired(deviceId) {
|
||||
const sql =
|
||||
'select device_id, name from devices where device_id=$1 and paired=TRUE'
|
||||
|
||||
return db
|
||||
.oneOrNone(sql, [deviceId])
|
||||
.then(row => (row && row.device_id === deviceId ? row.name : false))
|
||||
}
|
||||
|
||||
module.exports = { pair, unpair, authorizeCaDownload, isPaired }
|
||||
module.exports = { pair, unpair, authorizeCaDownload }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue