diff --git a/lib/routes.js b/lib/routes.js index a056343a..6f484139 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -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