From ad1ffdfd81c3957969fbb7817e049e478eb2f050 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 8 Mar 2016 13:54:08 +0200 Subject: [PATCH] fix test --- src/user/reset.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/user/reset.js b/src/user/reset.js index 0a4329cb7e..808e7d1f41 100644 --- a/src/user/reset.js +++ b/src/user/reset.js @@ -36,8 +36,7 @@ var async = require('async'), var code = utils.generateUUID(); async.parallel([ async.apply(db.setObjectField, 'reset:uid', code, uid), - async.apply(db.sortedSetAdd, 'reset:issueDate', Date.now(), code), - async.apply(db.sortedSetAdd, 'reset:issueDate:uid', Date.now(), uid), + async.apply(db.sortedSetAdd, 'reset:issueDate', Date.now(), code) ], function(err) { callback(err, code); }); @@ -71,6 +70,9 @@ var async = require('async'), uid = _uid; canGenerate(uid, next); }, + function(next) { + db.sortedSetAdd('reset:issueDate:uid', Date.now(), uid, next); + }, function(next) { UserReset.generate(uid, next); },