This commit is contained in:
Baris Soner Usakli
2014-01-26 17:17:34 -05:00
parent fac2cd9464
commit 25442a89ca
11 changed files with 77 additions and 66 deletions

View File

@@ -18,14 +18,10 @@ SocketCategories.loadMore = function(socket, data, callback) {
var topicsPerPage = parseInt(meta.config.topicsPerPage, 10) || 20;
var start = data.after,
var start = parseInt(data.after, 10),
end = start + topicsPerPage - 1;
categories.getCategoryTopics(data.cid, start, end, socket.uid, function(err, topics) {
callback(err, {
topics: topics
});
});
console.log(start, end);
categories.getCategoryTopics(data.cid, start, end, socket.uid, callback);
};
SocketCategories.getPageCount = function(socket, cid, callback) {