cleanup in move rencet replies'

This commit is contained in:
Baris Soner Usakli
2014-02-07 11:45:13 -05:00
parent d2bed7791c
commit 72c35db6fd
2 changed files with 6 additions and 16 deletions

View File

@@ -290,21 +290,16 @@ var db = require('./database'),
db.sortedSetRemove('categories:recent_posts:cid:' + oldCid, pid);
db.sortedSetAdd('categories:recent_posts:cid:' + cid, timestamp, pid);
callback(null);
callback();
});
}
topics.getPids(tid, function(err, pids) {
if(err) {
return callback(err, null);
return callback(err);
}
async.each(pids, movePost, function(err) {
if(err) {
return callback(err, null);
}
callback(null, 1);
});
async.each(pids, movePost, callback);
});
};