Commit 0e64aeef authored by strong's avatar strong

查询列表的关联子话题populate设置20上限

parent 6a20f670
...@@ -784,7 +784,7 @@ function getSubThreads(doc, sort, callback) { ...@@ -784,7 +784,7 @@ function getSubThreads(doc, sort, callback) {
if (sort) { if (sort) {
sortBy = sort; sortBy = sort;
} }
ForumThread.find(conditions, subThreadFields).populate('from', 'icon').sort(sortBy).exec(function(err, docs) { ForumThread.find(conditions, subThreadFields).populate('from', 'icon').limit(Number(20)).sort(sortBy).exec(function(err, docs) {
if (err) { if (err) {
console.error(err); console.error(err);
callback(err, null); callback(err, null);
......
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