From c07bf466b248f0cfb7c59f51603f07440be2f0ee Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Mon, 13 Jan 2014 15:45:50 -0500 Subject: [PATCH] added back search limiting --- src/routes/api.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes/api.js b/src/routes/api.js index 0f16d85bf6..2bfd66a8de 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -258,6 +258,10 @@ var path = require('path'), return callback(err, null); } + if(pids.length > 50) { + pids = pids.splice(0, 50); + } + posts.getPostSummaryByPids(pids, false, function (err, posts) { if (err){ return callback(err, null); @@ -273,6 +277,10 @@ var path = require('path'), return callback(err, null); } + if(tids.length > 50) { + tids = tids.splice(0, 50); + } + topics.getTopicsByTids(tids, 0, function (topics) { callback(null, topics); }, 0);