Commit 9b7830a2 authored by strong's avatar strong

Merge commit '6404a060' into SANDBOX

parents e6ad37f7 6404a060
...@@ -770,11 +770,6 @@ function getSubThreads(doc, sort, callback) { ...@@ -770,11 +770,6 @@ function getSubThreads(doc, sort, callback) {
pid: doc._id, pid: doc._id,
status: 1 status: 1
}; };
countAllByFid(conditions, function(err, count) {
if (err) {
console.error(err);
callback(err, null);
} else {
var sortBy = '-top -quality -created'; var sortBy = '-top -quality -created';
if (sort) { if (sort) {
sortBy = sort; sortBy = sort;
...@@ -797,7 +792,7 @@ function getSubThreads(doc, sort, callback) { ...@@ -797,7 +792,7 @@ function getSubThreads(doc, sort, callback) {
} }
}); });
var obj = {}; var obj = {};
obj.total = count; obj.total = list.length;
obj.items = list; obj.items = list;
var newDoc = doc.toObject(); var newDoc = doc.toObject();
...@@ -806,8 +801,6 @@ function getSubThreads(doc, sort, callback) { ...@@ -806,8 +801,6 @@ function getSubThreads(doc, sort, callback) {
callback(null, newDoc); callback(null, newDoc);
} }
}); });
}
});
} }
function getAllThreadByFidHelp(conditions, pageNo, pageSize, sort, callback) { function getAllThreadByFidHelp(conditions, pageNo, pageSize, sort, callback) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment