|
|
@ -36,8 +36,7 @@ var async = require('async'),
|
|
|
|
var code = utils.generateUUID();
|
|
|
|
var code = utils.generateUUID();
|
|
|
|
async.parallel([
|
|
|
|
async.parallel([
|
|
|
|
async.apply(db.setObjectField, 'reset:uid', code, uid),
|
|
|
|
async.apply(db.setObjectField, 'reset:uid', code, uid),
|
|
|
|
async.apply(db.sortedSetAdd, 'reset:issueDate', Date.now(), code),
|
|
|
|
async.apply(db.sortedSetAdd, 'reset:issueDate', Date.now(), code)
|
|
|
|
async.apply(db.sortedSetAdd, 'reset:issueDate:uid', Date.now(), uid),
|
|
|
|
|
|
|
|
], function(err) {
|
|
|
|
], function(err) {
|
|
|
|
callback(err, code);
|
|
|
|
callback(err, code);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -71,6 +70,9 @@ var async = require('async'),
|
|
|
|
uid = _uid;
|
|
|
|
uid = _uid;
|
|
|
|
canGenerate(uid, next);
|
|
|
|
canGenerate(uid, next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
function(next) {
|
|
|
|
|
|
|
|
db.sortedSetAdd('reset:issueDate:uid', Date.now(), uid, next);
|
|
|
|
|
|
|
|
},
|
|
|
|
function(next) {
|
|
|
|
function(next) {
|
|
|
|
UserReset.generate(uid, next);
|
|
|
|
UserReset.generate(uid, next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|