fix pairing bug
This commit is contained in:
parent
b0c139629b
commit
becd62a1fb
1 changed files with 2 additions and 2 deletions
|
|
@ -184,7 +184,7 @@ function ca (req, res) {
|
||||||
|
|
||||||
return pairing.authorizeCaDownload(token)
|
return pairing.authorizeCaDownload(token)
|
||||||
.then(valid => {
|
.then(valid => {
|
||||||
if (valid) return res.json({ca: pair.ca()})
|
if (valid) return res.json({ca: pairing.ca()})
|
||||||
|
|
||||||
return res.status(408).end()
|
return res.status(408).end()
|
||||||
})
|
})
|
||||||
|
|
@ -339,7 +339,7 @@ function authorize (req, res, next) {
|
||||||
const deviceId = req.connection.getPeerCertificate().fingerprint
|
const deviceId = req.connection.getPeerCertificate().fingerprint
|
||||||
console.log(deviceId)
|
console.log(deviceId)
|
||||||
|
|
||||||
return pair.isPaired(deviceId)
|
return pairing.isPaired(deviceId)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
if (r) {
|
if (r) {
|
||||||
req.deviceId = deviceId
|
req.deviceId = deviceId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue