-
-
Save tj/1100363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.register = function(req, res, next) { | |
var client; | |
client = this.client; | |
return exports.validate(req, res, function() { | |
return client.hmset("person:" + req.body.wid, req.body, function(err, response) { | |
if (err != null) { | |
return next(err); | |
} else { | |
req.newUser = req.body; | |
console.log("success. Saved record."); | |
return next; | |
} | |
}); | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.register = function(req, res, next) { | |
... | |
exports.validate(req, res, function(){ | |
client.hmset..(function(err){ | |
if (err) { | |
next(err); | |
} else { | |
req.newUser = ... | |
next(); | |
} | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment