Skip to content

Instantly share code, notes, and snippets.

@randallb
Created July 22, 2011 20:30

Revisions

  1. Randall Bennett created this gist Jul 22, 2011.
    15 changes: 15 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    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;
    }
    });
    });
    };