fix pairing bug

This commit is contained in:
Josh Harvey 2016-11-19 16:31:54 +02:00
parent b0c139629b
commit becd62a1fb

View file

@ -184,7 +184,7 @@ function ca (req, res) {
return pairing.authorizeCaDownload(token)
.then(valid => {
if (valid) return res.json({ca: pair.ca()})
if (valid) return res.json({ca: pairing.ca()})
return res.status(408).end()
})
@ -339,7 +339,7 @@ function authorize (req, res, next) {
const deviceId = req.connection.getPeerCertificate().fingerprint
console.log(deviceId)
return pair.isPaired(deviceId)
return pairing.isPaired(deviceId)
.then(r => {
if (r) {
req.deviceId = deviceId