closes #742, closes #741

This commit is contained in:
Baris Soner Usakli
2014-01-07 17:30:29 -05:00
parent 6f94acd0f2
commit a4ae9c70df
8 changed files with 158 additions and 26 deletions

View File

@@ -292,7 +292,10 @@ var winston = require('winston'),
}
ThreadTools.getLatestUndeletedPid = function(tid, callback) {
db.getListRange('tid:' + tid + ':posts', 0, -1, function(err, pids) {
db.getSortedSetRange('tid:' + tid + ':posts', 0, -1, function(err, pids) {
if(err) {
return callback(err);
}
if (pids.length === 0) {
return callback(new Error('no-undeleted-pids-found'));
}