Skip to content

Commit

Permalink
fix master.js in lock_example
Browse files Browse the repository at this point in the history
  • Loading branch information
medicalwei committed Jul 1, 2015
1 parent 9d3d2f2 commit f3e3db5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/examples/lock_example/master.js
Expand Up @@ -69,9 +69,9 @@ DemoMaster.prototype.start = function() {
} else if (self.pairTopicPath && topic === self.pairTopicPath) {
var opt = JSON.parse(message.content);
console.log("Received pair request from %s", message.source);
console.log("Pair code: %s", opt.pairCode);
if (self.pairCode === opt.pairCode) {
self.endpoint.publish(src, "authorize");
console.log("Pair code: %s", opt.options.pairCode);
if (self.pairCode === opt.options.pairCode) {
self.endpoint.publish(message.source, "authorize");
} else {
console.log("Pair codes do not match");
}
Expand Down

0 comments on commit f3e3db5

Please sign in to comment.