mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
fixed category sockets
This commit is contained in:
@@ -11,11 +11,15 @@ SocketCategories.get = function(socket, data, callback) {
|
||||
};
|
||||
|
||||
SocketCategories.loadMore = function(socket, data, callback) {
|
||||
if(!data) {
|
||||
return callback(new Error('invalid data'));
|
||||
}
|
||||
|
||||
var start = data.after,
|
||||
end = start + 9;
|
||||
|
||||
categories.getCategoryTopics(data.cid, start, end, socket.uid, function(topics) {
|
||||
callback(null, {
|
||||
categories.getCategoryTopics(data.cid, start, end, socket.uid, function(err, topics) {
|
||||
callback(err, {
|
||||
topics: topics
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user