improve config saving; fix pairing bug
This commit is contained in:
parent
67e12b19cb
commit
f3f46f7b5b
4 changed files with 81 additions and 9 deletions
|
|
@ -6,14 +6,12 @@ const baseX = require('base-x')
|
|||
|
||||
const options = require('../options')
|
||||
const db = require('../db')
|
||||
const pairing = require('../pairing')
|
||||
|
||||
const ALPHA_BASE = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
|
||||
const bsAlpha = baseX(ALPHA_BASE)
|
||||
|
||||
function unpair (deviceId) {
|
||||
const sql = 'delete from devices where device_id=$1'
|
||||
return db.none(sql, [deviceId])
|
||||
}
|
||||
const unpair = pairing.unpair
|
||||
|
||||
function totem (hostname, name) {
|
||||
const caPath = options.caPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue