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

@@ -121,7 +121,6 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
});
// BEGIN: API calls (todo: organize)
// julian: :^)
socket.on('api:updateHeader', function(data) {
if(uid) {
@@ -391,6 +390,12 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
});
}
});
socket.on('api:admin.topics.getMore', function(data) {
topics.getAllTopics(data.limit, data.after, function(topics) {
socket.emit('api:admin.topics.getMore', JSON.stringify(topics));
});
});
});
}(SocketIO));