adding 'load more topics' button to topic admin

This commit is contained in:
Julian Lam
2013-06-24 13:03:34 -04:00
parent 3ef32ba7fb
commit 89e852f692
5 changed files with 54 additions and 8 deletions

View File

@@ -57,10 +57,7 @@ var user = require('./../user.js'),
}
break;
case 'topics':
topics.getAllTopics(function(topics) {
topics.sort(function(a, b) {
return b.timestamp - a.timestamp;
});
topics.getAllTopics(10, null, function(topics) {
res.json({
topics: topics
});