Create support_logs (db & api)
This commit is contained in:
parent
b7d6f3f419
commit
62d606cc80
8 changed files with 279 additions and 58 deletions
|
|
@ -46,12 +46,12 @@ function pair (token, deviceId, machineModel) {
|
|||
.then(r => {
|
||||
if (r.expired) return false
|
||||
|
||||
const insertSql = `insert into devices (device_id) values ($1)
|
||||
const insertSql = `insert into devices (device_id, name) values ($1, $2)
|
||||
on conflict (device_id)
|
||||
do update set paired=TRUE, display=TRUE`
|
||||
|
||||
return configureNewDevice(deviceId, r.name, machineModel)
|
||||
.then(() => db.none(insertSql, [deviceId]))
|
||||
.then(() => db.none(insertSql, [deviceId, r.name]))
|
||||
.then(() => true)
|
||||
})
|
||||
.catch(err => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue