update(cb) { const id = this.id; db.set(`user:id:${this.name}`, id, (err) => { if (err) return cb(err); db.hmset(`user:${id}`, this, (err) => { cb(err); }); }); }
db.set('user:id:' + user.name, id, function(err) { if (err) return fn(err); db.hmset('user:' + id, user, function(err) { fn(err); }); });
app.post('/call/add', function(req,res){ var newCall = { name: req.body.name, company: req.body.company, phone: req.body.phone, time: req.body.time }; client.hmset('call', [ 'name', newCall.name, 'company', newCall.company, 'phone', newCall.phone, 'time', newCall.time, ], function(error, reply){ if(error){ console.log(error); } console.log(reply); return res.redirect('/'); }); });
client.hmset('jsApiTicket', json, function (err, response) {
client.set('user:id:' + user.name, user.id, function (err) { if(err) return fn(err); client.hmset('huser:' + user.id, user, function (err) { fn(err, user.id); }) })
return callback(null, isUserKeyTaken); } else { redisClient.hmset(userKey.toString('utf8'), userObject, function(err, reply) {
client.hmset('weixin', json, function (err, response) {
update(cb) { const id = this.id; db.set(`user:id:${this.name}`, id, (err) => { if (err) return cb(err); db.hmset(`user:${id}`, this, (err) => { cb(err); }); }); }
update(cb) { const id = this.id; db.set(`user:id:${this.name}`, id, (err) => { if (err) return cb(err); db.hmset(`user:${id}`, this, (err) => { cb(err); }); }); }
update(cb) { const id = this.id; db.set(`user:id:${this.name}`, id, (err) => { if (err) return cb(err); db.hmset(`user:${id}`, this, (err) => { cb(err); }); }); }