mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
if there are more than 50 results only return 50, issue #648
This commit is contained in:
@@ -237,6 +237,10 @@ var path = require('path'),
|
|||||||
return callback(err, null);
|
return callback(err, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(pids.length > 50) {
|
||||||
|
pids = pids.splice(0, 50);
|
||||||
|
}
|
||||||
|
|
||||||
posts.getPostSummaryByPids(pids, false, function (err, posts) {
|
posts.getPostSummaryByPids(pids, false, function (err, posts) {
|
||||||
if (err){
|
if (err){
|
||||||
return callback(err, null);
|
return callback(err, null);
|
||||||
@@ -252,6 +256,10 @@ var path = require('path'),
|
|||||||
return callback(err, null);
|
return callback(err, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(tids.length > 50) {
|
||||||
|
tids = tids.splice(0, 50);
|
||||||
|
}
|
||||||
|
|
||||||
topics.getTopicsByTids(tids, 0, function (topics) {
|
topics.getTopicsByTids(tids, 0, function (topics) {
|
||||||
callback(null, topics);
|
callback(null, topics);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user