WIP
This commit is contained in:
parent
a35e9d2d44
commit
340ad2b518
8 changed files with 129 additions and 38 deletions
|
|
@ -150,7 +150,11 @@ function pair (req, res, next) {
|
|||
|
||||
return pairing.pair(token, deviceId)
|
||||
.then(valid => {
|
||||
if (valid) return res.end()
|
||||
if (valid) {
|
||||
return helpers.updateMachineDefaults(deviceId)
|
||||
.then(() => res.json({status: 'paired'}))
|
||||
}
|
||||
|
||||
throw httpError('Pairing failed')
|
||||
})
|
||||
.catch(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue