From 69a9570186db99edec8a56fd18194827cebd0204 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 16 Jan 2014 15:16:12 -0500 Subject: [PATCH] migrated catefories.js to new socketAL format --- src/socket.io/categories.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/socket.io/categories.js b/src/socket.io/categories.js index e00e61c1e5..b670f1ff8d 100644 --- a/src/socket.io/categories.js +++ b/src/socket.io/categories.js @@ -2,13 +2,13 @@ var categories = require('../categories'), SocketCategories = {}; -SocketCategories.getRecentReplies = function(tid, callback, sessionData) { - categories.getRecentReplies(tid, sessionData.uid, 4, function(err, replies) { +SocketCategories.getRecentReplies = function(socket, tid, callback) { + categories.getRecentReplies(tid, socket.uid, 4, function(err, replies) { callback(replies); }); }; -SocketCategories.get = function(callback) { +SocketCategories.get = function(socket, data, callback) { categories.getAllCategories(0, function(err, categories) { if(callback) { callback(categories); @@ -16,11 +16,11 @@ SocketCategories.get = function(callback) { }); }; -SocketCategories.loadMore = function(data, callback, sessionData) { +SocketCategories.loadMore = function(socket, data, callback) { var start = data.after, end = start + 9; - categories.getCategoryTopics(data.cid, start, end, sessionData.uid, function(topics) { + categories.getCategoryTopics(data.cid, start, end, socket.uid, function(topics) { callback({ topics: topics });