Lots of development
This commit is contained in:
parent
5cbec6bd23
commit
3a244f691e
19 changed files with 594 additions and 837 deletions
|
|
@ -11,14 +11,7 @@ const ALPHA_BASE = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
|
|||
const bsAlpha = baseX(ALPHA_BASE)
|
||||
|
||||
function unpair (deviceId) {
|
||||
const sql = 'update devices set paired=FALSE where device_id=$1'
|
||||
|
||||
return db.none(sql, [deviceId])
|
||||
}
|
||||
|
||||
function repair (deviceId) {
|
||||
const sql = 'update devices set paired=TRUE where device_id=$1'
|
||||
|
||||
const sql = 'delete from devices where device_id=$1'
|
||||
return db.none(sql, [deviceId])
|
||||
}
|
||||
|
||||
|
|
@ -39,4 +32,4 @@ function totem (hostname, name) {
|
|||
})
|
||||
}
|
||||
|
||||
module.exports = {totem, unpair, repair}
|
||||
module.exports = {totem, unpair}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue